diff options
author | imp <imp@FreeBSD.org> | 1997-03-29 04:34:07 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-29 04:34:07 +0000 |
commit | 141381e1cbdbd8001c13e9e8c0adbfc81d1b3cd0 (patch) | |
tree | ab151e53b638b3b80f31c7b8a8ab143c391d7b75 /usr.bin/hexdump | |
parent | 167db5291223948e17d74470feff53f15777fcaf (diff) | |
download | FreeBSD-src-141381e1cbdbd8001c13e9e8c0adbfc81d1b3cd0.zip FreeBSD-src-141381e1cbdbd8001c13e9e8c0adbfc81d1b3cd0.tar.gz |
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Diffstat (limited to 'usr.bin/hexdump')
-rw-r--r-- | usr.bin/hexdump/hexsyntax.c | 2 | ||||
-rw-r--r-- | usr.bin/hexdump/odsyntax.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/hexdump/hexsyntax.c b/usr.bin/hexdump/hexsyntax.c index 2c13db2..279a68c 100644 --- a/usr.bin/hexdump/hexsyntax.c +++ b/usr.bin/hexdump/hexsyntax.c @@ -65,7 +65,7 @@ newsyntax(argc, argvp) add("\"%08.8_ax \" 8/1 \"%02x \" \" \" 8/1 \"%02x \" "); add("\" |\" 16/1 \"%_p\" \"|\\n\""); } - while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != EOF) + while ((ch = getopt(argc, argv, "bcCde:f:n:os:vx")) != -1) switch (ch) { case 'b': add("\"%07.7_Ax\n\""); diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c index b6143f0..e4c4e72 100644 --- a/usr.bin/hexdump/odsyntax.c +++ b/usr.bin/hexdump/odsyntax.c @@ -61,7 +61,7 @@ oldsyntax(argc, argvp) deprecated = 1; argv = *argvp; - while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != EOF) + while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != -1) switch (ch) { case 'a': odprecede(); |