From: kn Date: Sun, 28 Jul 2024 21:44:42 +0000 (+0000) Subject: The dash must not come first in the getopt(3) string X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dd24756f1f8299c5d226ef2fe14ef8cdd81f2da7;p=openbsd 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 --- diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index c1629759baa..b70e28c7705 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -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':