From: Magnus Jacobsson Date: Fri, 2 Oct 2020 13:02:46 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in gvmap X-Git-Tag: 2.46.0~20^2^2~47^2~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d30dcb835d36d999d3eee3014ab55189d0f77d11;p=graphviz Show usage and exit non-zero for unsupported option in gvmap Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/cmd/gvmap/gvmap.c b/cmd/gvmap/gvmap.c index 66429e77b..9a64c779b 100644 --- a/cmd/gvmap/gvmap.c +++ b/cmd/gvmap/gvmap.c @@ -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; }