diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-04-25 23:07:17 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-04-25 23:07:17 +0000 |
commit | d91ff422a1ca661e754262bf90b1ae1ab2d060a1 (patch) | |
tree | 88ed33897e5f7da4a935466d23b365c283aa061e /usr.bin/fmt/fmt.c | |
parent | faa0bc61b53fc1652f4d9a2bc11a7cd21182c533 (diff) |
getopt(3) returns -1 on end of args, not EOF.
Diffstat (limited to 'usr.bin/fmt/fmt.c')
-rw-r--r-- | usr.bin/fmt/fmt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c index 2cb9ebe2cce..8cfef155ac4 100644 --- a/usr.bin/fmt/fmt.c +++ b/usr.bin/fmt/fmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt.c,v 1.10 1998/04/25 23:02:28 millert Exp $ */ +/* $OpenBSD: fmt.c,v 1.11 1998/04/25 23:07:16 millert Exp $ */ /* Sensible version of fmt * @@ -168,7 +168,7 @@ #ifndef lint static const char rcsid[] = - "$OpenBSD: fmt.c,v 1.10 1998/04/25 23:02:28 millert Exp $"; + "$OpenBSD: fmt.c,v 1.11 1998/04/25 23:07:16 millert Exp $"; static const char copyright[] = "Copyright (c) 1997 Gareth McCaughan. All rights reserved.\n"; #endif /* not lint */ @@ -284,7 +284,7 @@ main(int argc, char *argv[]) { /* 1. Grok parameters. */ - while ((ch = getopt(argc, argv, "cd:hl:mpst:")) != EOF) switch(ch) { + while ((ch = getopt(argc, argv, "cd:hl:mpst:")) != -1) switch(ch) { case 'c': centerP = 1; continue; |