]> granicus.if.org Git - graphviz/commitdiff
Show usage and exit non-zero for unsupported option in gvmap
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 2 Oct 2020 13:02:46 +0000 (15:02 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:24 +0000 (21:10 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1843.

cmd/gvmap/gvmap.c

index 66429e77b82b1f563b109037f6209bb76f1408d3..9a64c779b48e0315270c20cbff8c0a5c18533d23 100644 (file)
@@ -392,8 +392,8 @@ init(int argc, char **argv, params_t* pm)
       if (optopt == '?')
         usage(cmd, 0);
       else {
-        fprintf(stderr, " option -%c unrecognized - ignored\n", optopt);
-        usage(cmd, 0);
+        fprintf(stderr, " option -%c unrecognized\n", optopt);
+        usage(cmd, 1);
       }
       break;
     }