From: Magnus Jacobsson Date: Sun, 4 Oct 2020 18:51:58 +0000 (+0200) Subject: Explicitly specify -? as an option in gvcolor X-Git-Tag: 2.46.0~20^2^2~47^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fcd3606d265c4a112e468f387a47a7483933491;p=graphviz Explicitly specify -? as an option in gvcolor --- diff --git a/cmd/tools/gvcolor.c b/cmd/tools/gvcolor.c index d1320a2aa..e73bf9cad 100644 --- a/cmd/tools/gvcolor.c +++ b/cmd/tools/gvcolor.c @@ -88,10 +88,10 @@ static void init(int argc, char *argv[]) int c; 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, "gvcolor: option -%c unrecognized\n",