summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-02-08 18:29:12 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-02-08 18:29:12 +0000
commit1ecf4d0dd69d36cf7cfd45d31ff61b49dbf702f3 (patch)
treea78c208b2ea694d3e725a60b530de9852fff32a1
parent4f662a3b50a09808c001696c2a5e4d148578b754 (diff)
no real point in calling getopt() twice
-rw-r--r--sbin/ipf/ipf.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sbin/ipf/ipf.c b/sbin/ipf/ipf.c
index 09aec089b00..b9926da8497 100644
--- a/sbin/ipf/ipf.c
+++ b/sbin/ipf/ipf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipf.c,v 1.15 1999/02/08 06:23:26 millert Exp $ */
+/* $OpenBSD: ipf.c,v 1.16 1999/02/08 18:29:11 millert Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
*
@@ -45,7 +45,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)ipf.c 1.23 6/5/96 (C) 1993-1995 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ipf.c,v 1.15 1999/02/08 06:23:26 millert Exp $";
+static const char rcsid[] = "@(#)$Id: ipf.c,v 1.16 1999/02/08 18:29:11 millert Exp $";
#endif
static void frsync __P((void));
@@ -57,7 +57,6 @@ extern char *index __P((const char *, int));
#endif
extern char *optarg;
-extern int optreset;
void zerostats __P((void));
int main __P((int, char *[]));
@@ -89,12 +88,6 @@ char *argv[];
{
int c;
- while ((c = getopt(argc, argv, OPTS)) != -1)
- if (c == '?')
- usage();
-
- optreset = 1;
- optind = 1;
while ((c = getopt(argc, argv, OPTS)) != -1) {
switch (c)
{
@@ -154,6 +147,9 @@ char *argv[];
case 'Z' :
zerostats();
break;
+ default :
+ usage();
+ break;
}
}