From 424b6c648aa2012a63792b6296c254c8cdb13b40 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Tue, 20 Oct 2020 08:30:27 +0200 Subject: [PATCH] Fix dijkstra -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- cmd/tools/dijkstra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", -- 2.40.0