]> granicus.if.org Git - graphviz/commitdiff
Fix dijkstra -? to actually print usage instead of error on macOS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Oct 2020 06:30:27 +0000 (08:30 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 24 Oct 2020 05:46:24 +0000 (07:46 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1852.

cmd/tools/dijkstra.c

index ddf5704e8d501c870cabcfab763bb1f505b3825f..2b3819380ff7b4d323a4ce7ee13821d9125c3c3d 100644 (file)
@@ -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",