From 2a704f6cf530579bb1ce0e8a8677cdef8855a89e Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 9 Nov 1999 21:59:09 +0000 Subject: Correct the ``-unix X'' parsing (last time I only corrected ``-unitX''. Pointed out twice by: Gert-Jan Vons --- usr.sbin/ppp/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index 5671a54..2cce11e 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -232,7 +232,9 @@ ProcessArgs(int argc, char **argv, struct switches *sw) #endif optc--; /* this option isn't exclusive */ } else if (strncmp(cp, "unit", 4) == 0) { + optc--; /* this option isn't exclusive */ if (cp[4] == '\0') { + optc--; /* nor is the argument */ if (++arg == argc) { fprintf(stderr, "-unit: Expected unit number\n"); Usage(); @@ -240,7 +242,6 @@ ProcessArgs(int argc, char **argv, struct switches *sw) sw->unit = atoi(argv[arg]); } else sw->unit = atoi(cp + 4); - optc--; /* this option isn't exclusive */ } else if (strcmp(cp, "quiet") == 0) { sw->quiet = 1; optc--; /* this option isn't exclusive */ -- cgit v1.1