From: Stephen Hemminger Date: Thu, 14 Mar 2013 20:47:49 +0000 (-0700) Subject: ipaddress: minor white space cleanup X-Git-Tag: v3.9.0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1124ffb721ea4f3e53abdb54070314cbd6bb6956;p=thirdparty%2Fiproute2.git ipaddress: minor white space cleanup Convert leading spaces to tabs, and put alias in one printf --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 3c08ace8a..149df69d2 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -96,8 +96,8 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown) fprintf(fp, "NO-CARRIER%s", flags ? "," : ""); flags &= ~IFF_RUNNING; #define _PF(f) if (flags&IFF_##f) { \ - flags &= ~IFF_##f ; \ - fprintf(fp, #f "%s", flags ? "," : ""); } + flags &= ~IFF_##f ; \ + fprintf(fp, #f "%s", flags ? "," : ""); } _PF(LOOPBACK); _PF(BROADCAST); _PF(POINTOPOINT); @@ -117,7 +117,7 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown) _PF(DORMANT); _PF(ECHO); #undef _PF - if (flags) + if (flags) fprintf(fp, "%x", flags); if (mdown) fprintf(fp, ",M-DOWN"); @@ -469,8 +469,7 @@ int print_linkinfo(const struct sockaddr_nl *who, print_linktype(fp, tb[IFLA_LINKINFO]); if (do_link && tb[IFLA_IFALIAS]) { - fprintf(fp, "%s", _SL_); - fprintf(fp," alias %s", + fprintf(fp, "%s alias %s", _SL_, rta_getattr_str(tb[IFLA_IFALIAS])); } @@ -1425,4 +1424,3 @@ int do_ipaddr(int argc, char **argv) fprintf(stderr, "Command \"%s\" is unknown, try \"ip addr help\".\n", *argv); exit(-1); } -