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