summaryrefslogtreecommitdiff
path: root/usr.sbin/vmctl
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2018-10-05 12:54:58 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2018-10-05 12:54:58 +0000
commit6b8c56fe37ffe2eeb4dee7545341043662dbed1c (patch)
tree8844a07c26795e8fa7746386fd2fd6f94d916c3e /usr.sbin/vmctl
parent618c102877c5d44b60ebd1be22c2c637aa4604fd (diff)
Setting getopt optreset to 1 needs an additional reset of optind to 1.
OK millert@
Diffstat (limited to 'usr.sbin/vmctl')
-rw-r--r--usr.sbin/vmctl/main.c3
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();