summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2001-10-26 06:23:03 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2001-10-26 06:23:03 +0000
commitb5482e53abd80c52e0b35795d00914e6c0f70ae7 (patch)
tree752e03e4297b38df1d4d94dccbde8015f9e71d86 /usr.sbin
parent13e21bc14aacc8cfa2178e11798fc46c4b5c6786 (diff)
getopt(3) returns -1 when out of args, not EOF.
itojun@ ok
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rip6query/rip6query.c4
-rw-r--r--usr.sbin/traceroute6/traceroute6.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/rip6query/rip6query.c b/usr.sbin/rip6query/rip6query.c
index 4d827d3ffda..e21fe047b36 100644
--- a/usr.sbin/rip6query/rip6query.c
+++ b/usr.sbin/rip6query/rip6query.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rip6query.c,v 1.2 2001/03/09 03:24:10 deraadt Exp $ */
+/* $OpenBSD: rip6query.c,v 1.3 2001/10/26 06:23:02 mpech Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -84,7 +84,7 @@ main(argc, argv)
char pbuf[10];
struct addrinfo hints, *res;
- while ((c = getopt(argc, argv, "I:")) != EOF) {
+ while ((c = getopt(argc, argv, "I:")) != -1) {
switch (c) {
case 'I':
ifidx = if_nametoindex(optarg);
diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c
index 809c457283c..d4427239c96 100644
--- a/usr.sbin/traceroute6/traceroute6.c
+++ b/usr.sbin/traceroute6/traceroute6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute6.c,v 1.15 2001/01/12 19:10:48 brad Exp $ */
+/* $OpenBSD: traceroute6.c,v 1.16 2001/10/26 06:23:02 mpech Exp $ */
/* $KAME: traceroute6.c,v 1.39 2000/12/22 15:11:05 itojun Exp $ */
/*
@@ -419,7 +419,7 @@ main(argc, argv)
seq = 0;
- while ((ch = getopt(argc, argv, "df:g:lm:np:q:rs:w:v")) != EOF)
+ while ((ch = getopt(argc, argv, "df:g:lm:np:q:rs:w:v")) != -1)
switch(ch) {
case 'd':
options |= SO_DEBUG;