Source-Changes-HG archive

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

[src/trunk]: src/dist/dhcp/client Check for '-' as first character only after...



details:   https://anonhg.NetBSD.org/src/rev/f9a349dec138
branches:  trunk
changeset: 519286:f9a349dec138
user:      wiz <wiz%NetBSD.org@localhost>
date:      Fri Dec 14 15:20:17 2001 +0000

description:
Check for '-' as first character only after we checked all recognized
options. Problem report and fix by Tero Kivinen in bin/14935.

diffstat:

 dist/dhcp/client/dhclient.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a4ba86bda680 -r f9a349dec138 dist/dhcp/client/dhclient.c
--- a/dist/dhcp/client/dhclient.c       Fri Dec 14 15:16:42 2001 +0000
+++ b/dist/dhcp/client/dhclient.c       Fri Dec 14 15:20:17 2001 +0000
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.2 2001/08/03 13:07:03 drochner Exp $ Copyright (c) 1995-2001 Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.3 2001/12/14 15:20:17 wiz Exp $ Copyright (c) 1995-2001 Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -198,8 +198,6 @@
                } else if (!strcmp (argv [i], "-w")) {
                        /* do not exit if there are no broadcast interfaces. */
                        persist = 1;
-               } else if (argv [i][0] == '-') {
-                   usage ();
                } else if (!strcmp (argv [i], "-e")) {
                        struct string_list *tmp;
                        if (++i == argc)
@@ -216,6 +214,8 @@
                        exit (0);
                } else if (!strcmp (argv [i], "-nw")) {
                        nowait = 1;
+               } else if (argv [i][0] == '-') {
+                   usage ();
                } else {
                    struct interface_info *tmp = (struct interface_info *)0;
                    status = interface_allocate (&tmp, MDL);



Home | Main Index | Thread Index | Old Index