]> granicus.if.org Git - graphviz/commitdiff
Show usage and exit non-zero for unsupported option in smyrna
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 3 Oct 2020 14:03:13 +0000 (16:03 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:25 +0000 (21:10 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1843.

cmd/smyrna/main.c

index 13d952887af8665524d9802a8d364b7d965b1047..1a34b0f52e63be9242c534462b386312668209c3 100644 (file)
@@ -136,10 +136,12 @@ static char *parseArgs(int argc, char *argv[], ViewInfo * view)
        case '?':
            if (optopt == '\0')
                usage(0);
-           else
+           else {
                fprintf(stderr,
-                       "smyrna: option -%c unrecognized - ignored\n",
+                       "smyrna: option -%c unrecognized\n",
                        optopt);
+               usage(1);
+           }
            break;
        }
     }