diff options
Diffstat (limited to 'networking/libiproute/ipaddress.c')
-rw-r--r-- | networking/libiproute/ipaddress.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 6a5f2cfbd..86eaf7d86 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -167,20 +167,20 @@ static int print_linkinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who, | |||
167 | fprintf(fp, "%c link/%s ", _SL_, ll_type_n2a(ifi->ifi_type, b1, sizeof(b1))); | 167 | fprintf(fp, "%c link/%s ", _SL_, ll_type_n2a(ifi->ifi_type, b1, sizeof(b1))); |
168 | 168 | ||
169 | if (tb[IFLA_ADDRESS]) { | 169 | if (tb[IFLA_ADDRESS]) { |
170 | fprintf(fp, "%s", ll_addr_n2a(RTA_DATA(tb[IFLA_ADDRESS]), | 170 | fputs(ll_addr_n2a(RTA_DATA(tb[IFLA_ADDRESS]), |
171 | RTA_PAYLOAD(tb[IFLA_ADDRESS]), | 171 | RTA_PAYLOAD(tb[IFLA_ADDRESS]), |
172 | ifi->ifi_type, | 172 | ifi->ifi_type, |
173 | b1, sizeof(b1))); | 173 | b1, sizeof(b1)), fp); |
174 | } | 174 | } |
175 | if (tb[IFLA_BROADCAST]) { | 175 | if (tb[IFLA_BROADCAST]) { |
176 | if (ifi->ifi_flags&IFF_POINTOPOINT) | 176 | if (ifi->ifi_flags&IFF_POINTOPOINT) |
177 | fprintf(fp, " peer "); | 177 | fprintf(fp, " peer "); |
178 | else | 178 | else |
179 | fprintf(fp, " brd "); | 179 | fprintf(fp, " brd "); |
180 | fprintf(fp, "%s", ll_addr_n2a(RTA_DATA(tb[IFLA_BROADCAST]), | 180 | fputs(ll_addr_n2a(RTA_DATA(tb[IFLA_BROADCAST]), |
181 | RTA_PAYLOAD(tb[IFLA_BROADCAST]), | 181 | RTA_PAYLOAD(tb[IFLA_BROADCAST]), |
182 | ifi->ifi_type, | 182 | ifi->ifi_type, |
183 | b1, sizeof(b1))); | 183 | b1, sizeof(b1)), fp); |
184 | } | 184 | } |
185 | } | 185 | } |
186 | fputc('\n', fp); | 186 | fputc('\n', fp); |
@@ -282,10 +282,10 @@ static int print_addrinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who, | |||
282 | fprintf(fp, " family %d ", ifa->ifa_family); | 282 | fprintf(fp, " family %d ", ifa->ifa_family); |
283 | 283 | ||
284 | if (rta_tb[IFA_LOCAL]) { | 284 | if (rta_tb[IFA_LOCAL]) { |
285 | fprintf(fp, "%s", rt_addr_n2a(ifa->ifa_family, | 285 | fputs(rt_addr_n2a(ifa->ifa_family, |
286 | RTA_PAYLOAD(rta_tb[IFA_LOCAL]), | 286 | RTA_PAYLOAD(rta_tb[IFA_LOCAL]), |
287 | RTA_DATA(rta_tb[IFA_LOCAL]), | 287 | RTA_DATA(rta_tb[IFA_LOCAL]), |
288 | abuf, sizeof(abuf))); | 288 | abuf, sizeof(abuf)), fp); |
289 | 289 | ||
290 | if (rta_tb[IFA_ADDRESS] == NULL || | 290 | if (rta_tb[IFA_ADDRESS] == NULL || |
291 | memcmp(RTA_DATA(rta_tb[IFA_ADDRESS]), RTA_DATA(rta_tb[IFA_LOCAL]), 4) == 0) { | 291 | memcmp(RTA_DATA(rta_tb[IFA_ADDRESS]), RTA_DATA(rta_tb[IFA_LOCAL]), 4) == 0) { |
@@ -334,7 +334,7 @@ static int print_addrinfo(struct sockaddr_nl ATTRIBUTE_UNUSED *who, | |||
334 | if (ifa->ifa_flags) | 334 | if (ifa->ifa_flags) |
335 | fprintf(fp, "flags %02x ", ifa->ifa_flags); | 335 | fprintf(fp, "flags %02x ", ifa->ifa_flags); |
336 | if (rta_tb[IFA_LABEL]) | 336 | if (rta_tb[IFA_LABEL]) |
337 | fprintf(fp, "%s", (char*)RTA_DATA(rta_tb[IFA_LABEL])); | 337 | fputs((char*)RTA_DATA(rta_tb[IFA_LABEL]), fp); |
338 | if (rta_tb[IFA_CACHEINFO]) { | 338 | if (rta_tb[IFA_CACHEINFO]) { |
339 | struct ifa_cacheinfo *ci = RTA_DATA(rta_tb[IFA_CACHEINFO]); | 339 | struct ifa_cacheinfo *ci = RTA_DATA(rta_tb[IFA_CACHEINFO]); |
340 | char buf[128]; | 340 | char buf[128]; |