From: Matthew Fernandez Date: Wed, 4 Jan 2023 04:27:31 +0000 (-0800) Subject: expr exeval: remove shadowing of 'expr' global X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=378eb7fcb93a17937fb0cd7f8a6fff95c04cfda0;p=graphviz expr exeval: remove shadowing of 'expr' global --- diff --git a/lib/expr/exeval.c b/lib/expr/exeval.c index 10e9597f4..b80936451 100644 --- a/lib/expr/exeval.c +++ b/lib/expr/exeval.c @@ -2012,29 +2012,27 @@ static Extype_t eval(Expr_t *ex, Exnode_t *exnode, void *env) { * evaluate expression expr */ -Extype_t -exeval(Expr_t* ex, Exnode_t* expr, void* env) -{ +Extype_t exeval(Expr_t *ex, Exnode_t *exnode, void *env) { Extype_t v; - if (expr->compiled.integer) + if (exnode->compiled.integer) { - switch (expr->type) + switch (exnode->type) { case FLOATING: - v.floating = expr->compiled.floating(ex->disc->data); + v.floating = exnode->compiled.floating(ex->disc->data); break; case STRING: - v.string = expr->compiled.string(ex->disc->data); + v.string = exnode->compiled.string(ex->disc->data); break; default: - v.integer = expr->compiled.integer(ex->disc->data); + v.integer = exnode->compiled.integer(ex->disc->data); break; } } else { - v = eval(ex, expr, env); + v = eval(ex, exnode, env); if (ex->loopcount > 0) { ex->loopcount = 0;