From: Matthew Fernandez Date: Sat, 2 Jul 2022 20:47:40 +0000 (-0700) Subject: gvpr: make use of 'okay' clearer in 'evalEdge' X-Git-Tag: 5.0.0~5^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c623fcd1e50f379f05b255dbe2b63f3a9a081bcf;p=graphviz gvpr: make use of 'okay' clearer in 'evalEdge' Squashes a -Wconversion warning. --- diff --git a/lib/gvpr/gvpr.c b/lib/gvpr/gvpr.c index 47c8f5a3d..d026b8d12 100644 --- a/lib/gvpr/gvpr.c +++ b/lib/gvpr/gvpr.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -440,15 +441,15 @@ static Agobj_t* evalEdge(Gpr_t * state, Expr_t* prog, comp_block * xprog, Agedge { int i; case_stmt *cs; - int okay; + bool okay; state->curobj = (Agobj_t *) e; for (i = 0; i < xprog->n_estmts; i++) { cs = xprog->edge_stmts + i; if (cs->guard) - okay = (exeval(prog, cs->guard, state)).integer; + okay = exeval(prog, cs->guard, state).integer != 0; else - okay = 1; + okay = true; if (okay) { if (cs->action) exeval(prog, cs->action, state);