summaryrefslogtreecommitdiff
path: root/bin/sh/histedit.c
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 /bin/sh/histedit.c
parentbf6413046b73005ecca3f5352c8711d00a6d00b9 (diff)
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'bin/sh/histedit.c')
-rw-r--r--bin/sh/histedit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index 319bd86e33f..1e1da1fd79b 100644
--- a/bin/sh/histedit.c
+++ b/bin/sh/histedit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: histedit.c,v 1.6 1996/10/20 00:54:50 millert Exp $ */
+/* $OpenBSD: histedit.c,v 1.7 1997/01/15 23:40:28 millert Exp $ */
/* $NetBSD: histedit.c,v 1.8 1995/05/11 21:29:12 christos Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
#else
-static char rcsid[] = "$OpenBSD: histedit.c,v 1.6 1996/10/20 00:54:50 millert Exp $";
+static char rcsid[] = "$OpenBSD: histedit.c,v 1.7 1997/01/15 23:40:28 millert Exp $";
#endif
#endif /* not lint */
@@ -211,7 +211,7 @@ histcmd(argc, argv)
optreset = 1; optind = 1; /* initialize getopt */
while (not_fcnumber(argv[optind]) &&
- (ch = getopt(argc, argv, ":e:lnrs")) != EOF)
+ (ch = getopt(argc, argv, ":e:lnrs")) != -1)
switch ((char)ch) {
case 'e':
editor = optarg;