diff options
author | tjr <tjr@FreeBSD.org> | 2002-05-29 23:52:55 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-05-29 23:52:55 +0000 |
commit | 31d09977d0bd11e6225db949f884d83c03f8d527 (patch) | |
tree | 4251540ce413c49c7eebd67ec64cac831c647119 | |
parent | 304195369eee5fe75eac0bdc75ac62baadc09987 (diff) | |
download | FreeBSD-src-31d09977d0bd11e6225db949f884d83c03f8d527.zip FreeBSD-src-31d09977d0bd11e6225db949f884d83c03f8d527.tar.gz |
Don't bother trying to handle "-" arguments ourselves, getopt(3) already
does this for us.
-rw-r--r-- | usr.bin/uniq/uniq.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 890cc95..4317ede 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -83,11 +83,8 @@ main (argc, argv) (void) setlocale(LC_ALL, ""); obsolete(argv); - while ((ch = getopt(argc, argv, "-cdif:s:u")) != -1) + while ((ch = getopt(argc, argv, "cdif:s:u")) != -1) switch (ch) { - case '-': - --optind; - goto done; case 'c': cflag = 1; break; @@ -115,7 +112,7 @@ main (argc, argv) usage(); } -done: argc -= optind; + argc -= optind; argv +=optind; /* If no flags are set, default is -d -u. */ |