diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-02-24 01:26:45 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-02-24 01:26:45 +0000 |
commit | 55635d8e29c69d21c7e8fd32046d240b94bbdc7f (patch) | |
tree | 5d5414f667580c579229585b99b13c63065945ff /mergecap.c | |
parent | 6c48782f6a622f379dc503a74fffc15df749a675 (diff) |
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).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4793 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'mergecap.c')
-rw-r--r-- | mergecap.c | 4 |
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': |