From: Magnus Jacobsson Date: Sat, 3 Oct 2020 14:04:44 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in lib/pack/ptest.c X-Git-Tag: 2.46.0~20^2^2~47^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=663a92b8ba330a1be301601655772532f663f69f;p=graphviz Show usage and exit non-zero for unsupported option in lib/pack/ptest.c Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/lib/pack/ptest.c b/lib/pack/ptest.c index fb3deddf4..83d9a3d07 100644 --- a/lib/pack/ptest.c +++ b/lib/pack/ptest.c @@ -86,9 +86,11 @@ static void init(int argc, char *argv[]) case '?': if (optopt == '?') usage(0); - else + else { fprintf(stderr, - "ptest: option -%c unrecognized - ignored\n", c); + "ptest: option -%c unrecognized\n", c); + usage(1); + } break; } }