From: Matthew Fernandez Date: Sat, 29 May 2021 18:05:00 +0000 (-0700) Subject: use a C99 bool for nop’s chkOnly flag X-Git-Tag: 2.47.3~16^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7952909598f22d188c96e3084c1efcb1705e5121;p=graphviz use a C99 bool for nop’s chkOnly flag The semantics of this flag were already a boolean value, so we can use the type system to more obviously indicate this. --- diff --git a/cmd/tools/nop.c b/cmd/tools/nop.c index 92f2f4541..5dea43c86 100644 --- a/cmd/tools/nop.c +++ b/cmd/tools/nop.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #ifdef HAVE_UNISTD_H @@ -21,7 +22,7 @@ #include char **Files; -int chkOnly; +bool chkOnly; static const char useString[] = "Usage: nop [-p?] \n\ -p - check for valid DOT\n\ @@ -42,7 +43,7 @@ static void init(int argc, char *argv[]) while ((c = getopt(argc, argv, "p?")) != -1) { switch (c) { case 'p': - chkOnly = 1; + chkOnly = true; break; case '?': if (optopt == '\0' || optopt == '?')