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