From 49555c4c2695fa953ee1a99421ee565a749a186e Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 3 Oct 2020 16:15:01 +0200 Subject: [PATCH] Explicitly specify -? as an option in tred2 --- cmd/tools/tred2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/tools/tred2.c b/cmd/tools/tred2.c index 297c1d9db..511e51324 100644 --- a/cmd/tools/tred2.c +++ b/cmd/tools/tred2.c @@ -60,10 +60,10 @@ static void init(int argc, char *argv[]) CmdName = argv[0]; opterr = 0; - while ((c = getopt(argc, argv, ":")) != -1) { + while ((c = getopt(argc, argv, ":?")) != -1) { switch (c) { case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr, "%s: option -%c unrecognized\n", -- 2.40.0