summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/main.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-11-09 21:59:09 +0000
committerbrian <brian@FreeBSD.org>1999-11-09 21:59:09 +0000
commit2a704f6cf530579bb1ce0e8a8677cdef8855a89e (patch)
tree4ad89a3b286f6fe7a4a9b8e450bb80cee6dc3abe /usr.sbin/ppp/main.c
parentb1f829ffa60332f6e9ad4c4934247006ed24f245 (diff)
downloadFreeBSD-src-2a704f6cf530579bb1ce0e8a8677cdef8855a89e.zip
FreeBSD-src-2a704f6cf530579bb1ce0e8a8677cdef8855a89e.tar.gz
Correct the ``-unix X'' parsing (last time I only corrected
``-unitX''. Pointed out twice by: Gert-Jan Vons <gert-jan@bigfoot.com>
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r--usr.sbin/ppp/main.c3
1 files changed, 2 insertions, 1 deletions
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 */
OpenPOWER on IntegriCloud