]> granicus.if.org Git - graphviz/commitdiff
Fix nop -? to actually print usage instead of error on macOS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 20 Oct 2020 06:31:58 +0000 (08:31 +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/nop.c

index 7cdbc9ed9bc69e89f1025e6d4f76b3b0ff0d15ca..6b6ceeeeb2d2455b7655d5908aa38e0c150a7c9c 100644 (file)
@@ -48,7 +48,7 @@ static void init(int argc, char *argv[])
            chkOnly = 1;
            break;
        case '?':
-           if (optopt == '\0')
+           if (optopt == '\0' || optopt == '?')
                usage(0);
            else {
                fprintf(stderr, "nop: option -%c unrecognized\n",