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

cmd/tools/tred.c

index 4fec5e874b99c1ca65808d1b7b6bafe8f92b86ab..84b3e308617ba8e2d7eafafa3bc8c481d39cff2b 100644 (file)
@@ -257,7 +257,7 @@ static void init(int argc, char *argv[])
         PrintRemovedEdges = 1;
         break;
        case '?':
-           if (optopt == '\0')
+           if (optopt == '\0' || optopt == '?')
                usage(0);
            else {
                fprintf(stderr, "%s: option -%c unrecognized\n",