From: Magnus Jacobsson Date: Sun, 4 Oct 2020 18:56:14 +0000 (+0200) Subject: Explicitly specify -? as an option in nop X-Git-Tag: 2.46.0~20^2^2~47^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af8be8135996cc19c573d5e9965ec094528260eb;p=graphviz Explicitly specify -? as an option in nop --- diff --git a/cmd/tools/nop.c b/cmd/tools/nop.c index 008a5fc8a..7cdbc9ed9 100644 --- a/cmd/tools/nop.c +++ b/cmd/tools/nop.c @@ -42,13 +42,13 @@ static void init(int argc, char *argv[]) int c; opterr = 0; - while ((c = getopt(argc, argv, "p")) != -1) { + while ((c = getopt(argc, argv, "p?")) != -1) { switch (c) { case 'p': chkOnly = 1; break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr, "nop: option -%c unrecognized\n",