]> granicus.if.org Git - graphviz/commitdiff
Show usage and exit non-zero for unsupported option in cluster
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 2 Oct 2020 12:54:02 +0000 (14:54 +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/cluster.c

index 7c4c5c19ddeec42b53d3cd4a8fd4c7cf91b7e09c..bf97ace4bf65a5af4ef98757b40c4e03e8d92f3d 100644 (file)
@@ -123,9 +123,9 @@ static void init(int argc, char *argv[], opts_t* opts) {
       if (optopt == '?')
        usage(cmd, 0);
       else {
-       fprintf(stderr, " option -%c unrecognized - ignored\n",
+       fprintf(stderr, " option -%c unrecognized\n",
                optopt);
-       usage(cmd, 0);
+       usage(cmd, 1);
       }
       break;
     }