diff options
author | 2018-10-05 12:54:57 +0000 | |
---|---|---|
committer | 2018-10-05 12:54:57 +0000 | |
commit | 8ff019a1cbc2fab52b6dbd33e8152b92c94b19ce (patch) | |
tree | 63e2edd15aa19d6bcfd0e5339d0dfb3889f9c410 | |
parent | It is perfectly legal in C++ to use the same name for a struct tag (diff) | |
download | wireguard-openbsd-8ff019a1cbc2fab52b6dbd33e8152b92c94b19ce.tar.xz wireguard-openbsd-8ff019a1cbc2fab52b6dbd33e8152b92c94b19ce.zip |
Setting getopt optreset to 1 needs an additional reset of optind to 1.
OK millert@
-rw-r--r-- | usr.sbin/vmctl/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c index 8748ecfdedc..69c5e013f4c 100644 --- a/usr.sbin/vmctl/main.c +++ b/usr.sbin/vmctl/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.44 2018/10/01 09:31:15 reyk Exp $ */ +/* $OpenBSD: main.c,v 1.45 2018/10/05 12:54:57 reyk Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -125,6 +125,7 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; optreset = 1; + optind = 1; if (argc < 1) usage(); |