From: Magnus Jacobsson Date: Tue, 20 Oct 2020 06:31:49 +0000 (+0200) Subject: Fix mm2gv -? to actually print usage instead of error on macOS X-Git-Tag: 2.46.0~20^2^2~15^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e57a9e7e60862fcf462e3ee26ac638db1e15eef;p=graphviz Fix mm2gv -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- diff --git a/cmd/tools/mm2gv.c b/cmd/tools/mm2gv.c index 73a1f6a97..0c4434d5a 100644 --- a/cmd/tools/mm2gv.c +++ b/cmd/tools/mm2gv.c @@ -421,7 +421,7 @@ static void init(int argc, char **argv, parms_t * p) fprintf(stderr, "%s: option -%c missing argument - ignored\n", cmd, optopt); break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(0); else { fprintf(stderr,