]> granicus.if.org Git - graphviz/commitdiff
expr: [nfc] remove unnecessary parens and dereference of 'binaryf'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Feb 2022 19:10:04 +0000 (11:10 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 27 Feb 2022 22:57:01 +0000 (14:57 -0800)
The C compiler knows how to dereference and call through a function pointer
without needing this manual instruction.

lib/expr/exeval.c

index 2762dd366348b577b8d3ab7ac96e8e11f95576d2..b07273537d669fbd788449f8f6df620b31ff51de 100644 (file)
@@ -1686,7 +1686,8 @@ eval(Expr_t* ex, Exnode_t* expr, void* env)
                        tmp.data.constant.value = v;
                        rtmp = *x;
                        rtmp.data.constant.value = r;
-                       if (!(*ex->disc->binaryf) (ex, &tmp, expr, &rtmp, 0, ex->disc)) return tmp.data.constant.value;
+                       if (!ex->disc->binaryf(ex, &tmp, expr, &rtmp, 0, ex->disc))
+                         return tmp.data.constant.value;
                }
        }
        switch (expr->data.operand.left->type)
@@ -1808,7 +1809,7 @@ eval(Expr_t* ex, Exnode_t* expr, void* env)
                                rp = &rtmp;
                        } else
                                rp = 0;
-                       if (!(*ex->disc->binaryf) (ex, &tmp, expr, rp, 0, ex->disc))
+                       if (!ex->disc->binaryf(ex, &tmp, expr, rp, 0, ex->disc))
                                return tmp.data.constant.value;
                }
                goto integer;