From: Magnus Jacobsson Date: Sun, 4 Oct 2020 18:58:25 +0000 (+0200) Subject: Explicitly specify -? as an option in tred X-Git-Tag: 2.46.0~20^2^2~47^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6fd32738e015d7320593e00156346e6f2c00068;p=graphviz Explicitly specify -? as an option in tred --- diff --git a/cmd/tools/tred.c b/cmd/tools/tred.c index 386b1f23d..4fec5e874 100644 --- a/cmd/tools/tred.c +++ b/cmd/tools/tred.c @@ -248,7 +248,7 @@ static void init(int argc, char *argv[]) CmdName = argv[0]; opterr = 0; - while ((c = getopt(argc, argv, "vr")) != -1) { + while ((c = getopt(argc, argv, "vr?")) != -1) { switch (c) { case 'v': Verbose = 1; @@ -257,7 +257,7 @@ static void init(int argc, char *argv[]) PrintRemovedEdges = 1; break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr, "%s: option -%c unrecognized\n",