summaryrefslogtreecommitdiff
path: root/src/usr.bin
diff options
context:
space:
mode:
authormillert <>1997-01-15 23:43:43 +0000
committermillert <>1997-01-15 23:43:43 +0000
commit3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c (patch)
tree2f4eb6cb395038759776aa9f3a547726e402ce80 /src/usr.bin
parentf8953640b655af43a4ee7a6448038e8c3fe37076 (diff)
downloadopenbsd-3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c.tar.gz
openbsd-3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c.tar.bz2
openbsd-3dcd8c4aebf5203dff6e9d4c88414c207e0ab74c.zip
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'src/usr.bin')
-rw-r--r--src/usr.bin/nc/netcat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c
index 5ceb4f1d2f..f6c10424a7 100644
--- a/src/usr.bin/nc/netcat.c
+++ b/src/usr.bin/nc/netcat.c
@@ -1389,7 +1389,7 @@ main (argc, argv)
1389 1389
1390/* If your shitbox doesn't have getopt, step into the nineties already. */ 1390/* If your shitbox doesn't have getopt, step into the nineties already. */
1391/* optarg, optind = next-argv-component [i.e. flag arg]; optopt = last-char */ 1391/* optarg, optind = next-argv-component [i.e. flag arg]; optopt = last-char */
1392 while ((x = getopt (argc, argv, "ae:g:G:hi:lno:p:rs:tuvw:z")) != EOF) { 1392 while ((x = getopt (argc, argv, "ae:g:G:hi:lno:p:rs:tuvw:z")) != -1) {
1393/* Debug (("in go: x now %c, optarg %x optind %d", x, optarg, optind)) */ 1393/* Debug (("in go: x now %c, optarg %x optind %d", x, optarg, optind)) */
1394 switch (x) { 1394 switch (x) {
1395 case 'a': 1395 case 'a':