From c623fcd1e50f379f05b255dbe2b63f3a9a081bcf Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 2 Jul 2022 13:47:40 -0700 Subject: [PATCH] gvpr: make use of 'okay' clearer in 'evalEdge' Squashes a -Wconversion warning. --- lib/gvpr/gvpr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); -- 2.40.0