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/rarpd | |
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/rarpd')
-rw-r--r-- | usr.sbin/rarpd/arptab.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rarpd/arptab.c b/usr.sbin/rarpd/arptab.c index 3e8ea40b15e..dac132dea16 100644 --- a/usr.sbin/rarpd/arptab.c +++ b/usr.sbin/rarpd/arptab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arptab.c,v 1.25 2015/11/19 19:31:20 deraadt Exp $ */ +/* $OpenBSD: arptab.c,v 1.26 2016/01/26 18:26:19 mmcc Exp $ */ /* * Copyright (c) 1984, 1993 @@ -240,7 +240,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); |