From 17835ecb128ab194297d4372d0315a7fa2a27ef3 Mon Sep 17 00:00:00 2001 From: des Date: Thu, 11 Jun 2009 07:50:36 +0000 Subject: As of sam's r175206, arp builds cleanly at WARNS level 6, but the Makefile was never updated. Also, clean up the macro that caused the warning in the first place (no functional changes, just wrapped and reindented). --- usr.sbin/arp/Makefile | 2 +- usr.sbin/arp/arp.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'usr.sbin/arp') diff --git a/usr.sbin/arp/Makefile b/usr.sbin/arp/Makefile index ea1c507..829367a 100644 --- a/usr.sbin/arp/Makefile +++ b/usr.sbin/arp/Makefile @@ -4,6 +4,6 @@ PROG= arp MAN= arp.4 arp.8 -WARNS?= 1 +WARNS?= 6 .include diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index f99cf0f..e585ba0 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -721,9 +721,13 @@ rtmsg(int cmd, struct sockaddr_inarp *dst, struct sockaddr_dl *sdl) case RTM_GET: rtm->rtm_addrs |= RTA_DST; } -#define NEXTADDR(w, s) \ - if ((s) != NULL && rtm->rtm_addrs & (w)) { \ - bcopy((s), cp, sizeof(*(s))); cp += SA_SIZE(s);} +#define NEXTADDR(w, s) \ + do { \ + if ((s) != NULL && rtm->rtm_addrs & (w)) { \ + bcopy((s), cp, sizeof(*(s))); \ + cp += SA_SIZE(s); \ + } \ + } while (0) NEXTADDR(RTA_DST, dst); NEXTADDR(RTA_GATEWAY, sdl); -- cgit v1.1