From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:31:58 +0000 (+0200) Subject: Fix nop -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24d10e0d0f776b9bbc753f9ab4c5436b93d9ea18;p=graphviz Fix nop -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/tools/nop.c b/cmd/tools/nop.c index 7cdbc9ed9..6b6ceeeeb 100644 --- a/cmd/tools/nop.c +++ b/cmd/tools/nop.c @@ -48,7 +48,7 @@ static void init(int argc, char *argv[]) chkOnly = 1; break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(0); else { fprintf(stderr, "nop: option -%c unrecognized\n",