diff options
-rw-r--r-- | sbin/brconfig/brconfig.c | 8 | ||||
-rw-r--r-- | sbin/fsirand/fsirand.c | 7 | ||||
-rw-r--r-- | sbin/ping6/ping6.c | 4 |
3 files changed, 8 insertions, 11 deletions
diff --git a/sbin/brconfig/brconfig.c b/sbin/brconfig/brconfig.c index d2aabbf611d..c73424b5062 100644 --- a/sbin/brconfig/brconfig.c +++ b/sbin/brconfig/brconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brconfig.c,v 1.32 2004/05/27 07:41:58 otto Exp $ */ +/* $OpenBSD: brconfig.c,v 1.33 2004/09/14 22:13:03 deraadt Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -1113,7 +1113,7 @@ bridge_rules(int s, char *brdg, char *ifname, char *delim) { char *inbuf = NULL, *inb; struct ifbrlconf ifc; - struct ifbrlreq *ifrp, ifreq; + struct ifbrlreq *ifrp; int len = 8192, i; while (1) { @@ -1126,12 +1126,12 @@ bridge_rules(int s, char *brdg, char *ifname, char *delim) strlcpy(ifc.ifbrl_ifsname, ifname, sizeof(ifc.ifbrl_ifsname)); if (ioctl(s, SIOCBRDGGRL, &ifc) < 0) err(1, "ioctl(SIOCBRDGGRL)"); - if (ifc.ifbrl_len + sizeof(ifreq) < len) + if (ifc.ifbrl_len + sizeof(*ifrp) < len) break; len *= 2; } ifrp = ifc.ifbrl_req; - for (i = 0; i < ifc.ifbrl_len; i += sizeof(ifreq)) { + for (i = 0; i < ifc.ifbrl_len; i += sizeof(*ifrp)) { ifrp = (struct ifbrlreq *)((caddr_t)ifc.ifbrl_req + i); bridge_showrule(ifrp, delim); } diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index 6b091421a89..24a4c0d8680 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsirand.c,v 1.21 2004/08/08 19:04:25 deraadt Exp $ */ +/* $OpenBSD: fsirand.c,v 1.22 2004/09/14 22:11:35 deraadt Exp $ */ /* * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fsirand.c,v 1.21 2004/08/08 19:04:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fsirand.c,v 1.22 2004/09/14 22:11:35 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -96,7 +96,7 @@ fsirand(char *device) static size_t oldibufsize; size_t ibufsize; struct fs *sblock, *tmpsblock; - ino_t inumber, maxino; + ino_t inumber; daddr_t dblk; char sbuf[SBSIZE], sbuftmp[SBSIZE]; int devfd, n, cg; @@ -131,7 +131,6 @@ fsirand(char *device) (n < SBSIZE) ? "short read" : strerror(errno)); return (1); } - maxino = sblock->fs_ncg * sblock->fs_ipg; /* Simple sanity checks on the superblock */ if (sblock->fs_magic != FS_MAGIC) { diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index 9984dc30c6b..87d458a4d26 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping6.c,v 1.58 2004/06/09 02:01:15 itojun Exp $ */ +/* $OpenBSD: ping6.c,v 1.59 2004/09/14 22:12:27 deraadt Exp $ */ /* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */ /* @@ -1063,7 +1063,6 @@ main(int argc, char *argv[]) for (;;) { struct msghdr m; - struct cmsghdr *cm; u_char buf[1024]; struct iovec iov[2]; @@ -1131,7 +1130,6 @@ main(int argc, char *argv[]) iov[0].iov_len = packlen; m.msg_iov = iov; m.msg_iovlen = 1; - cm = (struct cmsghdr *)buf; m.msg_control = (caddr_t)buf; m.msg_controllen = sizeof(buf); |