From 91b8b889905bc6b2e58859370985a0efd9316925 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 26 Feb 2022 11:10:04 -0800 Subject: [PATCH] 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. --- lib/expr/exeval.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.40.0