diff options
author | 2016-01-26 18:26:19 +0000 | |
---|---|---|
committer | 2016-01-26 18:26:19 +0000 | |
commit | cac6055cea954a818c7e2dc836e96910719ddaf9 (patch) | |
tree | 8e09e860d5198e356cca09900b4924eb4c5a48b6 /usr.sbin/arp/arp.c | |
parent | ensure the backup file has the same mtime as the original file, this is in line (diff) | |
download | wireguard-openbsd-cac6055cea954a818c7e2dc836e96910719ddaf9.tar.xz wireguard-openbsd-cac6055cea954a818c7e2dc836e96910719ddaf9.zip |
Use an unsigned int rather than an int when iterating through all 32
bits in the form:
for (i = 1; i; i <<= 1)
This avoids undefined operations when shifting into and out of the
highest-order bit.
ok millert@
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r-- | usr.sbin/arp/arp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 637cf791f82..6fa22adc5e9 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arp.c,v 1.70 2015/12/08 14:20:24 tedu Exp $ */ +/* $OpenBSD: arp.c,v 1.71 2016/01/26 18:26:19 mmcc Exp $ */ /* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */ /* @@ -695,7 +695,7 @@ rtget(struct sockaddr_inarp **sinp, struct sockaddr_dl **sdlp) struct sockaddr_dl *sdl = NULL; struct sockaddr *sa; char *cp; - int i; + unsigned int i; if (rtmsg(RTM_GET) < 0) return (1); |