aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.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 /editcap.c
parentf4f3208a00a0dd4ce9ff90077243c80767902ff1 (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). svn path=/trunk/; revision=4793
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/editcap.c b/editcap.c
index 72b986d28c..efd8b120ce 100644
--- a/editcap.c
+++ b/editcap.c
@@ -1,7 +1,7 @@
/* Edit capture files. We can delete records, adjust timestamps, or
* simply convert from one format to another format.
*
- * $Id: editcap.c,v 1.19 2002/02/08 10:07:33 guy Exp $
+ * $Id: editcap.c,v 1.20 2002/02/24 01:26:42 guy Exp $
*
* Originally written by Richard Sharpe.
* Improved by Guy Harris.
@@ -314,13 +314,13 @@ int main(int argc, char *argv[])
callback_arg args;
extern char *optarg;
extern int optind;
- char opt;
+ int opt;
char *p;
int snapshot_length;
/* Process the options first */
- while ((opt = getopt(argc, argv, "T:F:rvs:t:h")) != EOF) {
+ while ((opt = getopt(argc, argv, "T:F:rvs:t:h")) !=-1) {
switch (opt) {