summaryrefslogtreecommitdiffstats
path: root/usr.bin/comm
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-05-28 09:26:08 +0000
committertjr <tjr@FreeBSD.org>2002-05-28 09:26:08 +0000
commit14396afdcd2db9973538e507819146fe59a146e1 (patch)
treea68eb8a6cfcca1b69c39d6405181b08a090e75e7 /usr.bin/comm
parent5fe0fdb4325cc6485dada094f0101591c2c7291c (diff)
downloadFreeBSD-src-14396afdcd2db9973538e507819146fe59a146e1.zip
FreeBSD-src-14396afdcd2db9973538e507819146fe59a146e1.tar.gz
No need to handle '-' explicitly in getopt() loop.
Obtained from: NetBSD
Diffstat (limited to 'usr.bin/comm')
-rw-r--r--usr.bin/comm/comm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c
index 3c089c6..a063cfd 100644
--- a/usr.bin/comm/comm.c
+++ b/usr.bin/comm/comm.c
@@ -84,11 +84,8 @@ main(argc, argv)
(void) setlocale(LC_ALL, "");
- while ((ch = getopt(argc, argv, "-123i")) != -1)
+ while ((ch = getopt(argc, argv, "123i")) != -1)
switch(ch) {
- case '-':
- --optind;
- goto done;
case '1':
flag1 = 0;
break;
@@ -105,7 +102,7 @@ main(argc, argv)
default:
usage();
}
-done: argc -= optind;
+ argc -= optind;
argv += optind;
if (argc != 2)
OpenPOWER on IntegriCloud