diff options
Diffstat (limited to 'usr.sbin/arp')
-rw-r--r-- | usr.sbin/arp/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/arp/arp.c | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/arp/Makefile b/usr.sbin/arp/Makefile index ea1c507debc7..829367a770ff 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 <bsd.prog.mk> diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index f99cf0f89350..e585ba0fecd9 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); |