From: Magnus Jacobsson Date: Sun, 4 Oct 2020 18:45:54 +0000 (+0200) Subject: Explicitly specify -? as an option in bcomps X-Git-Tag: 2.46.0~20^2^2~47^2~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81852ca7b3eea614752c8d38230562a9027efe89;p=graphviz Explicitly specify -? as an option in bcomps --- diff --git a/cmd/tools/bcomps.c b/cmd/tools/bcomps.c index 6e60b4fd6..a48b73adc 100644 --- a/cmd/tools/bcomps.c +++ b/cmd/tools/bcomps.c @@ -335,7 +335,7 @@ static void init(int argc, char *argv[]) int c; opterr = 0; - while ((c = getopt(argc, argv, ":o:xstv")) != -1) { + while ((c = getopt(argc, argv, ":o:xstv?")) != -1) { switch (c) { case 'o': outfile = optarg; @@ -358,7 +358,7 @@ static void init(int argc, char *argv[]) fprintf(stderr, "bcomps: option -%c missing argument - ignored\n", optopt); break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr,