diff options
author | des <des@FreeBSD.org> | 2009-06-11 07:50:36 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2009-06-11 07:50:36 +0000 |
commit | 17835ecb128ab194297d4372d0315a7fa2a27ef3 (patch) | |
tree | 63beb81ba3d7feba3962844de12072382452eec2 | |
parent | b54b6d28ba346049e8588efb971a081f0111bcab (diff) | |
download | FreeBSD-src-17835ecb128ab194297d4372d0315a7fa2a27ef3.zip FreeBSD-src-17835ecb128ab194297d4372d0315a7fa2a27ef3.tar.gz |
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).
-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 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 <bsd.prog.mk> 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); |