aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/getopt/getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/getopt/getopt.c')
-rw-r--r--usr.bin/getopt/getopt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/getopt/getopt.c b/usr.bin/getopt/getopt.c
index 03b0987ef140..060e2c9ce17f 100644
--- a/usr.bin/getopt/getopt.c
+++ b/usr.bin/getopt/getopt.c
@@ -10,7 +10,7 @@ char *argv[];
int status = 0;
optind = 2; /* Past the program name and the option letters. */
- while ((c = getopt(argc, argv, argv[1])) != EOF)
+ while ((c = getopt(argc, argv, argv[1])) != -1)
switch (c) {
case '?':
status = 1; /* getopt routine gave message */