httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject incorrect getopt(3) usage in apache (fwd)
Date Mon, 25 Feb 2002 16:53:50 GMT


---------- Forwarded message ----------
Date: Sat, 23 Feb 2002 14:44:18 -0700
From: Peter Valchev <pvalchev@openbsd.org>
To: marcs@znep.com
Subject: incorrect getopt(3) usage in apache


Index: os/netware/getopt.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/src/os/netware/getopt.c,v
retrieving revision 1.1
diff -u -r1.1 getopt.c
--- os/netware/getopt.c	25 Jan 2000 18:30:09 -0000	1.1
+++ os/netware/getopt.c	23 Feb 2002 21:43:09 -0000
@@ -125,7 +125,7 @@
     int errflg = 0;
     char *ofile = NULL;
 
-    while ((c = getopt(argc, argv, "abo:")) != EOF)
+    while ((c = getopt(argc, argv, "abo:")) != -1)
         switch (c) {
         case 'a':
             if (bflg)
@@ -158,4 +158,4 @@
     return 0;
 }
 
-#endif /* TESTGETOPT */
\ No newline at end of file
+#endif /* TESTGETOPT */
Index: os/win32/getopt.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/src/os/win32/getopt.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 getopt.c
--- os/win32/getopt.c	1 Oct 1998 17:19:46 -0000	1.1.1.1
+++ os/win32/getopt.c	23 Feb 2002 21:43:34 -0000
@@ -136,7 +136,7 @@
       int errflg = 0;
       char *ofile = NULL;
 
-      while ((c = getopt(argc, argv, "abo:")) != EOF)
+      while ((c = getopt(argc, argv, "abo:")) != -1)
            switch (c) {
            case 'a':
                 if (bflg)
@@ -167,4 +167,4 @@
       return 0;
  }
 
-#endif /* TESTGETOPT */
\ No newline at end of file
+#endif /* TESTGETOPT */
Index: os/win32/win32/getopt.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/src/os/win32/win32/getopt.c,v
retrieving revision 1.1
diff -u -r1.1 getopt.c
--- os/win32/win32/getopt.c	29 Mar 2001 10:21:55 -0000	1.1
+++ os/win32/win32/getopt.c	23 Feb 2002 21:43:42 -0000
@@ -195,7 +195,7 @@
       int errflg = 0;
       char *ofile = NULL;
 
-      while ((c = getopt(argc, argv, "abo:")) != EOF)
+      while ((c = getopt(argc, argv, "abo:")) != -1)
            switch (c) {
            case 'a':
                 if (bflg)
Index: regex/main.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/src/regex/main.c,v
retrieving revision 1.3
diff -u -r1.3 main.c
--- regex/main.c	25 Jan 2000 18:30:17 -0000	1.3
+++ regex/main.c	23 Feb 2002 21:43:47 -0000
@@ -45,7 +45,7 @@
 
 	progname = argv[0];
 
-	while ((c = getopt(argc, argv, "c:e:S:E:x")) != EOF)
+	while ((c = getopt(argc, argv, "c:e:S:E:x")) != -1)
 		switch (c) {
 		case 'c':	/* compile options */
 			copts = options('c', optarg);


Mime
View raw message