Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ifconfig - Fix off-by-one error in previous.
details: https://anonhg.NetBSD.org/src/rev/cf53957c1d93
branches: trunk
changeset: 494996:cf53957c1d93
user: enami <enami%NetBSD.org@localhost>
date: Wed Jul 19 06:01:24 2000 +0000
description:
- Fix off-by-one error in previous.
- Fix a typo of ioctl name in warning message.
diffstat:
sbin/ifconfig/ifconfig.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r df0941c741a4 -r cf53957c1d93 sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c Wed Jul 19 06:00:39 2000 +0000
+++ b/sbin/ifconfig/ifconfig.c Wed Jul 19 06:01:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifconfig.c,v 1.85 2000/07/19 04:43:34 onoe Exp $ */
+/* $NetBSD: ifconfig.c,v 1.86 2000/07/19 06:01:24 enami Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
#if 0
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#else
-__RCSID("$NetBSD: ifconfig.c,v 1.85 2000/07/19 04:43:34 onoe Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.86 2000/07/19 06:01:24 enami Exp $");
#endif
#endif /* not lint */
@@ -1103,7 +1103,7 @@
val += 2;
p = nwid.i_nwid;
while (isxdigit((u_char)val[0]) && isxdigit((u_char)val[1])) {
- if (p > nwid.i_nwid + sizeof(nwid.i_nwid)) {
+ if (p >= nwid.i_nwid + sizeof(nwid.i_nwid)) {
warnx("SIOCS80211NWID: Too long nwid.");
return;
}
@@ -1145,7 +1145,7 @@
if (ioctl(s, SIOCG80211NWID, (caddr_t)&ifr) != 0)
return;
if (nwid.i_len > IEEE80211_NWID_LEN) {
- warnx("SIOCS80211NWID: wrong length of nwid (%d)", nwid.i_len);
+ warnx("SIOCG80211NWID: wrong length of nwid (%d)", nwid.i_len);
return;
}
i = 0;
Home |
Main Index |
Thread Index |
Old Index