aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-02-24 01:26:45 +0000
committerGuy Harris <guy@alum.mit.edu>2002-02-24 01:26:45 +0000
commit309e86246e8fb5859a5cfa20eb09a5848fa0724f (patch)
tree5d5414f667580c579229585b99b13c63065945ff /gtk
parentf4f3208a00a0dd4ce9ff90077243c80767902ff1 (diff)
downloadwireshark-309e86246e8fb5859a5cfa20eb09a5848fa0724f.tar.gz
wireshark-309e86246e8fb5859a5cfa20eb09a5848fa0724f.tar.bz2
wireshark-309e86246e8fb5859a5cfa20eb09a5848fa0724f.zip
From Peter Valchev: fix editcap to assign the result of "getopt()" to an
"int" and to check "getopt()"s return value with -1 rather than EOF. Fix other "getopt()" loops to check against -1 as well (EOF is -1 on most if not all platforms, but the Single UNIX Specification says "getopt()" returns -1, so we should check against -1, not EOF). svn path=/trunk/; revision=4793
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 9c42a28eb4..40a1815128 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.233 2002/02/18 01:08:44 guy Exp $
+ * $Id: main.c,v 1.234 2002/02/24 01:26:45 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1412,7 +1412,7 @@ main(int argc, char *argv[])
#endif
/* Now get our args */
- while ((opt = getopt(argc, argv, "a:b:B:c:f:hi:klm:nN:o:pP:Qr:R:Ss:t:T:w:W:vZ:")) != EOF) {
+ while ((opt = getopt(argc, argv, "a:b:B:c:f:hi:klm:nN:o:pP:Qr:R:Ss:t:T:w:W:vZ:")) != -1) {
switch (opt) {
case 'a': /* autostop criteria */
#ifdef HAVE_LIBPCAP