From: Matthew Fernandez Date: Sat, 26 Feb 2022 19:10:04 +0000 (-0800) Subject: expr: [nfc] remove unnecessary parens and dereference of 'binaryf' X-Git-Tag: 4.0.0~204^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91b8b889905bc6b2e58859370985a0efd9316925;p=graphviz expr: [nfc] remove unnecessary parens and dereference of 'binaryf' The C compiler knows how to dereference and call through a function pointer without needing this manual instruction. --- diff --git a/lib/expr/exeval.c b/lib/expr/exeval.c index 2762dd366..b07273537 100644 --- a/lib/expr/exeval.c +++ b/lib/expr/exeval.c @@ -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;