aboutsummaryrefslogtreecommitdiffstats
path: root/mergecap.c
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 /mergecap.c
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 'mergecap.c')
-rw-r--r--mergecap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mergecap.c b/mergecap.c
index d5ce6c63d1..024cbc74c4 100644
--- a/mergecap.c
+++ b/mergecap.c
@@ -1,6 +1,6 @@
/* Combine two dump files, either by appending or by merging by timestamp
*
- * $Id: mergecap.c,v 1.6 2002/02/08 10:07:34 guy Exp $
+ * $Id: mergecap.c,v 1.7 2002/02/24 01:26:42 guy Exp $
*
* Written by Scott Renfro <scott@renfro.org> based on
* editcap by Richard Sharpe and Guy Harris
@@ -405,7 +405,7 @@ main(int argc, char *argv[])
out_file.count = 1; /* frames output */
/* Process the options first */
- while ((opt = getopt(argc, argv, "hvas:T:F:w:")) != EOF) {
+ while ((opt = getopt(argc, argv, "hvas:T:F:w:")) != -1) {
switch (opt) {
case 'w':