From 2a923ca73e1abc2c897a4b7ced9ebbd7b6856e1c Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 3 Oct 2020 16:16:01 +0200 Subject: [PATCH] Explicitly specify -? as an option in sccmap --- doc/libgraph/sccmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/libgraph/sccmap.c b/doc/libgraph/sccmap.c index 0c37efc2e..8cd895726 100644 --- a/doc/libgraph/sccmap.c +++ b/doc/libgraph/sccmap.c @@ -292,7 +292,7 @@ static void scanArgs(int argc, char **argv) CmdName = argv[0]; opterr = 0; - while ((c = getopt(argc, argv, ":o:sdvS")) != EOF) { + while ((c = getopt(argc, argv, ":o:sdvS?")) != EOF) { switch (c) { case 's': StatsOnly = 1; @@ -311,7 +311,7 @@ static void scanArgs(int argc, char **argv) Silent = 1; break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr, "%s: option -%c unrecognized\n", -- 2.40.0