ip-route: Prevent some other double spaces in output

Print spaces only after text.

CC: Phil Sutter <phil@nwl.cc>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
Timothy Redaelli 2017-04-05 19:10:26 +02:00 committed by Stephen Hemminger
parent 058d28b44c
commit 5551ed44d3

View File

@ -677,6 +677,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
fprintf(fp, "%s", ll_index_to_name(nh->rtnh_ifindex)); fprintf(fp, "%s", ll_index_to_name(nh->rtnh_ifindex));
if (nh->rtnh_hops != 1) if (nh->rtnh_hops != 1)
fprintf(fp, "(ttl>%d)", nh->rtnh_hops); fprintf(fp, "(ttl>%d)", nh->rtnh_hops);
fprintf(fp, " ");
} else { } else {
fprintf(fp, "dev %s ", ll_index_to_name(nh->rtnh_ifindex)); fprintf(fp, "dev %s ", ll_index_to_name(nh->rtnh_ifindex));
if (r->rtm_family != AF_MPLS) if (r->rtm_family != AF_MPLS)