diff options
author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-06-07 02:35:21 +0000 |
---|---|---|
committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-06-07 02:35:21 +0000 |
commit | 6e473901a36c7708db089e56971167fbaee7c6ea (patch) | |
tree | fe74c91fae23845e91eb40ab9fbb26ed94882ff1 /usr.bin/cmp/cmp.c | |
parent | c87180589e5ebca53e3ccd70798eb155ee1c40ef (diff) | |
download | src-6e473901a36c7708db089e56971167fbaee7c6ea.tar.gz src-6e473901a36c7708db089e56971167fbaee7c6ea.zip |
No need to check for "-" explicitly in getopt() loop.
Notes
Notes:
svn path=/head/; revision=97985
Diffstat (limited to 'usr.bin/cmp/cmp.c')
-rw-r--r-- | usr.bin/cmp/cmp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c index 1184abe6b879..7a60ee98c8d7 100644 --- a/usr.bin/cmp/cmp.c +++ b/usr.bin/cmp/cmp.c @@ -72,7 +72,7 @@ main(argc, argv) int ch, fd1, fd2, special; const char *file1, *file2; - while ((ch = getopt(argc, argv, "-lsxz")) != -1) + while ((ch = getopt(argc, argv, "lsxz")) != -1) switch (ch) { case 'l': /* print all differences */ lflag = 1; @@ -88,14 +88,10 @@ main(argc, argv) case 'z': /* compare size first */ zflag = 1; break; - case '-': /* stdin (must be after options) */ - --optind; - goto endargs; case '?': default: usage(); } -endargs: argv += optind; argc -= optind; |