From 3492a70ae6d55f35c61944eb7eed4b2f7abd414f Mon Sep 17 00:00:00 2001 From: pvalchev Date: Wed, 20 Feb 2002 20:25:54 +0000 Subject: [PATCH] - getopt returns -1 when arg list is exhausted, not EOF - store getopt's return value into an int, not a char... --- net/arpcatch/patches/patch-arpcatch_c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/net/arpcatch/patches/patch-arpcatch_c b/net/arpcatch/patches/patch-arpcatch_c index 93b87001bd3..0d037412281 100644 --- a/net/arpcatch/patches/patch-arpcatch_c +++ b/net/arpcatch/patches/patch-arpcatch_c @@ -1,6 +1,22 @@ - $OpenBSD: patch-arpcatch_c,v 1.1 2001/04/20 07:53:02 reinhard Exp $ ---- arpcatch.c.orig Fri Aug 22 02:57:01 1997 -+++ arpcatch.c Tue Apr 17 16:00:13 2001 + $OpenBSD: patch-arpcatch_c,v 1.2 2002/02/20 20:25:54 pvalchev Exp $ +--- arpcatch.c.orig Thu Aug 21 18:57:01 1997 ++++ arpcatch.c Wed Feb 20 13:20:11 2002 +@@ -11,13 +11,13 @@ int debug = 0; + int defer = 0; + + int main(int argc, char **argv) { +- char c; ++ int c; + char *configfile = DEFAULT_CONFIGFILE; + char *device = DEFAULT_DEVICE; + table_t *at; + int fd; + +- while((c = getopt(argc, argv, "di:f:")) != EOF) { ++ while((c = getopt(argc, argv, "di:f:")) != -1) { + switch(c) { + case 'd': + debug++; @@ -37,6 +37,7 @@ int main(int argc, char **argv) { } }