diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dhclient/privsep.c | 9 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 8 |
2 files changed, 9 insertions, 8 deletions
diff --git a/sbin/dhclient/privsep.c b/sbin/dhclient/privsep.c index 0fb21656dee..cf47e56ceb6 100644 --- a/sbin/dhclient/privsep.c +++ b/sbin/dhclient/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.6 2004/05/04 19:56:18 henning Exp $ */ +/* $OpenBSD: privsep.c,v 1.7 2004/05/10 18:34:42 deraadt Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -62,8 +62,8 @@ buf_close(int sock, struct buf *buf) } while (n == -1 && (errno == EAGAIN || errno == EINTR)); if (buf->rpos < buf->size) - error("short write: wanted %u got %d bytes", buf->size, - buf->rpos); + error("short write: wanted %lu got %ld bytes", + (unsigned long)buf->size, (long)buf->rpos); free(buf->buf); free(buf); @@ -91,7 +91,8 @@ buf_read(int sock, void *buf, size_t nbytes) error("buf_read: %m"); if (r < nbytes) - error("short read: wanted %u got %d bytes", nbytes, r); + error("short read: wanted %lu got %ld bytes", + (unsigned long)nbytes, (long)r); return (r); } diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index d6754d0f904..58469421e24 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.97 2004/05/05 22:20:17 deraadt Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.98 2004/05/10 18:34:42 deraadt Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -77,7 +77,7 @@ static const char copyright[] = #if 0 static const char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #else -static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.97 2004/05/05 22:20:17 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: ifconfig.c,v 1.98 2004/05/10 18:34:42 deraadt Exp $"; #endif #endif /* not lint */ @@ -2399,9 +2399,9 @@ at_getaddr(const char *addr, int which) void setatrange(const char *range, int d) { - u_short first = 123, last = 123; + u_int first = 123, last = 123; - if (sscanf(range, "%hu-%hu", &first, &last) != 2 || + if (sscanf(range, "%u-%u", &first, &last) != 2 || first == 0 || first > 0xffff || last == 0 || last > 0xffff || first > last) errx(1, "%s: illegal net range: %u-%u", range, first, last); |