From: Magnus Jacobsson Date: Sat, 3 Oct 2020 14:03:13 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in smyrna X-Git-Tag: 2.46.0~20^2^2~47^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1fdfe2314ce69dda30b7e89b4788f4563725de0a;p=graphviz Show usage and exit non-zero for unsupported option in smyrna Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/cmd/smyrna/main.c b/cmd/smyrna/main.c index 13d952887..1a34b0f52 100644 --- a/cmd/smyrna/main.c +++ b/cmd/smyrna/main.c @@ -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; } }