From 24d10e0d0f776b9bbc753f9ab4c5436b93d9ea18 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Tue, 20 Oct 2020 08:31:58 +0200 Subject: [PATCH] Fix nop -? to actually print usage instead of error on macOS Towards https://gitlab.com/graphviz/graphviz/-/issues/1852. --- cmd/tools/nop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/nop.c b/cmd/tools/nop.c index 7cdbc9ed9..6b6ceeeeb 100644 --- a/cmd/tools/nop.c +++ b/cmd/tools/nop.c @@ -48,7 +48,7 @@ static void init(int argc, char *argv[]) chkOnly = 1; break; case '?': - if (optopt == '\0') + if (optopt == '\0' || optopt == '?') usage(0); else { fprintf(stderr, "nop: option -%c unrecognized\n", -- 2.40.0