1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00

The dash must not come first in the getopt(3) string

Broken/sorted in previous -u addition, fix/move it to the end.
By tb
This commit is contained in:
kn 2024-07-28 21:44:42 +00:00
parent a63a57f896
commit dd24756f1f

4
usr.bin/env/env.c vendored
View File

@ -1,4 +1,4 @@
/* $OpenBSD: env.c,v 1.18 2024/07/28 10:08:44 kn Exp $ */
/* $OpenBSD: env.c,v 1.19 2024/07/28 21:44:42 kn Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
@ -49,7 +49,7 @@ main(int argc, char *argv[])
if (pledge("stdio exec", NULL) == -1)
err(1, "pledge");
while ((ch = getopt(argc, argv, "-iu:")) != -1)
while ((ch = getopt(argc, argv, "iu:-")) != -1)
switch(ch) {
case '-': /* obsolete */
case 'i':