Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ifconfig Don't bother testing if a u_short is > 0xffff ...



details:   https://anonhg.NetBSD.org/src/rev/db1e6ab61027
branches:  trunk
changeset: 526590:db1e6ab61027
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon May 06 20:14:36 2002 +0000

description:
Don't bother testing if a u_short is > 0xffff -- that test is always false.

diffstat:

 sbin/ifconfig/ifconfig.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 95fd1102449e -r db1e6ab61027 sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c  Mon May 06 19:48:05 2002 +0000
+++ b/sbin/ifconfig/ifconfig.c  Mon May 06 20:14:36 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ifconfig.c,v 1.122 2002/04/25 09:39:17 itojun Exp $    */
+/*     $NetBSD: ifconfig.c,v 1.123 2002/05/06 20:14:36 thorpej 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.122 2002/04/25 09:39:17 itojun Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.123 2002/05/06 20:14:36 thorpej Exp $");
 #endif
 #endif /* not lint */
 
@@ -2681,8 +2681,8 @@
        u_short first = 123, last = 123;
 
        if (sscanf(range, "%hu-%hu", &first, &last) != 2
-           || first == 0 || first > 0xffff
-           || last == 0 || last > 0xffff || first > last)
+           || first == 0 /* || first > 0xffff */
+           || last == 0 /* || last > 0xffff */ || first > last)
                errx(1, "%s: illegal net range: %u-%u", range, first, last);
        at_nr.nr_firstnet = htons(first);
        at_nr.nr_lastnet = htons(last);



Home | Main Index | Thread Index | Old Index