From: Magnus Jacobsson Date: Sun, 4 Oct 2020 18:54:19 +0000 (+0200) Subject: Explicitly specify -? as an option in gvpack X-Git-Tag: 2.46.0~20^2^2~47^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e193ebcb0c932425b858db9696fdf807bc63096;p=graphviz Explicitly specify -? as an option in gvpack --- diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index b2de4bdd7..721625f38 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -195,7 +195,7 @@ static void init(int argc, char *argv[], pack_info* pinfo) pinfo->sz = 0; opterr = 0; - while ((c = getopt(argc, argv, ":na:gvum:s:o:G:")) != -1) { + while ((c = getopt(argc, argv, ":na:gvum:s:o:G:?")) != -1) { switch (c) { case 'a': len = strlen(optarg) + 2; @@ -243,7 +243,7 @@ static void init(int argc, char *argv[], pack_info* pinfo) fprintf(stderr, "gvpack: option -%c missing argument - ignored\n", optopt); break; case '?': - if (optopt == '?') + if (optopt == '\0') usage(0); else { fprintf(stderr,