]> granicus.if.org Git - graphviz/commitdiff
Explicitly specify -? as an option in sccmap
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sat, 3 Oct 2020 14:16:01 +0000 (16:16 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:26 +0000 (21:10 +0200)
doc/libgraph/sccmap.c

index 0c37efc2ea8dfc979164bf348d2dd2dbc132b87d..8cd895726d5f88d3dce48b710a12cbf78cddc9c1 100644 (file)
@@ -292,7 +292,7 @@ static void scanArgs(int argc, char **argv)
 
        CmdName = argv[0];
        opterr = 0;
-       while ((c = getopt(argc, argv, ":o:sdvS")) != EOF) {
+       while ((c = getopt(argc, argv, ":o:sdvS?")) != EOF) {
                switch (c) {
                case 's':
                        StatsOnly = 1;
@@ -311,7 +311,7 @@ static void scanArgs(int argc, char **argv)
                        Silent = 1;
                        break;
                case '?':
-                       if (optopt == '?')
+                       if (optopt == '\0')
                                usage(0);
                        else {
                                fprintf(stderr, "%s: option -%c unrecognized\n",