From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:08:51 +0000 (+0200) Subject: Fix bcomps -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=527c5daea4db952d4006e7b321f86dac40af0e2b;p=graphviz Fix bcomps -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/tools/bcomps.c b/cmd/tools/bcomps.c index a48b73adc..141b354af 100644 --- a/cmd/tools/bcomps.c +++ b/cmd/tools/bcomps.c @@ -358,7 +358,7 @@ static void init(int argc, char *argv[]) fprintf(stderr, "bcomps: option -%c missing argument - ignored\n", optopt); break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(0); else { fprintf(stderr,