]> granicus.if.org Git - graphviz/commitdiff
expr exeval: remove shadowing of 'expr' global
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 4 Jan 2023 04:27:31 +0000 (20:27 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 8 Jan 2023 19:57:18 +0000 (11:57 -0800)
lib/expr/exeval.c

index 10e9597f4730753e9ede2dfe2bef9115988b42c6..b80936451cd4abbaddb791ff6f807c5b690526e0 100644 (file)
@@ -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;