summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpctl/bgpctl.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-10-26 13:12:23 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-10-26 13:12:23 +0000
commit840bb8c6a85292eea7022f2f7b74779e23ac0f0e (patch)
treedb7645f652f4b422587fa43dfd00d14d1a313e3a /usr.sbin/bgpctl/bgpctl.c
parentb3942c66ac6fdb7b9b4b3358c56d4c33107dd173 (diff)
ease the parser a bit.
parse() now wants the first argv member to be the first argument it parses, i. e. it does not skip over argv[0] any more, caller has to account for that. the caller does the usual getopt followed by argv += optind; argc -= optind; dance so this is accounted for. in parse() don't use a seperate curarg counter, just in/decrease argv/argc claudio ok
Diffstat (limited to 'usr.sbin/bgpctl/bgpctl.c')
-rw-r--r--usr.sbin/bgpctl/bgpctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index f365f6c09ad..45bb0813426 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.67 2004/10/26 11:46:08 henning Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.68 2004/10/26 13:12:22 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -99,8 +99,8 @@ main(int argc, char *argv[])
/* NOTREACHED */
}
}
- argc -= (optind - 1);
- argv += (optind - 1);
+ argc -= optind;
+ argv += optind;
if ((res = parse(argc, argv)) == NULL)
exit(1);