summaryrefslogtreecommitdiff
path: root/usr.bin/cmp
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-01-15 23:44:39 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-01-15 23:44:39 +0000
commit552d265b6ced1e56d31f20f16a7fe9ae818d568b (patch)
tree219a59b7e7a5ef53ddfc66cdc38e73e3f79258c8 /usr.bin/cmp
parentbf6413046b73005ecca3f5352c8711d00a6d00b9 (diff)
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'usr.bin/cmp')
-rw-r--r--usr.bin/cmp/cmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c
index 9df77c0736c..80b7b8ed7c6 100644
--- a/usr.bin/cmp/cmp.c
+++ b/usr.bin/cmp/cmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmp.c,v 1.4 1996/08/01 00:29:10 michaels Exp $ */
+/* $OpenBSD: cmp.c,v 1.5 1997/01/15 23:42:19 millert Exp $ */
/* $NetBSD: cmp.c,v 1.7 1995/09/08 03:22:56 tls Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)cmp.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: cmp.c,v 1.4 1996/08/01 00:29:10 michaels Exp $";
+static char rcsid[] = "$OpenBSD: cmp.c,v 1.5 1997/01/15 23:42:19 millert Exp $";
#endif
#endif /* not lint */
@@ -77,7 +77,7 @@ main(argc, argv)
setlocale(LC_ALL, "");
- while ((ch = getopt(argc, argv, "ls")) != EOF)
+ while ((ch = getopt(argc, argv, "ls")) != -1)
switch (ch) {
case 'l': /* print all differences */
lflag = 1;