summaryrefslogtreecommitdiffstats
path: root/usr.bin/uniq
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-05-29 23:52:55 +0000
committertjr <tjr@FreeBSD.org>2002-05-29 23:52:55 +0000
commit31d09977d0bd11e6225db949f884d83c03f8d527 (patch)
tree4251540ce413c49c7eebd67ec64cac831c647119 /usr.bin/uniq
parent304195369eee5fe75eac0bdc75ac62baadc09987 (diff)
downloadFreeBSD-src-31d09977d0bd11e6225db949f884d83c03f8d527.zip
FreeBSD-src-31d09977d0bd11e6225db949f884d83c03f8d527.tar.gz
Don't bother trying to handle "-" arguments ourselves, getopt(3) already
does this for us.
Diffstat (limited to 'usr.bin/uniq')
-rw-r--r--usr.bin/uniq/uniq.c7
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. */
OpenPOWER on IntegriCloud