From: Matthew Fernandez Date: Fri, 5 Aug 2022 03:56:27 +0000 (-0700) Subject: expr: remove dereferencing and parens around calling 'Exdisc_t.reff' X-Git-Tag: 5.0.1~18^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7cec5cc97812345a0619c331c4ba13d6211a5b6;p=graphviz expr: remove dereferencing and parens around calling 'Exdisc_t.reff' The compiler does not need to be explicitly told how to call through a function pointer. --- diff --git a/lib/expr/exgram.h b/lib/expr/exgram.h index cf5dad23b..680bd5c49 100644 --- a/lib/expr/exgram.h +++ b/lib/expr/exgram.h @@ -397,8 +397,7 @@ static Exnode_t *makeVar(Expr_t * prog, Exid_t * s, Exnode_t * idx, if (!prog->disc->getf) exerror("%s: identifier references not supported", sym->name); else if (expr.program->disc->reff) - (*expr.program->disc->reff) (prog, nn, - nn->data.variable.symbol, refs); + expr.program->disc->reff(prog, nn, nn->data.variable.symbol, refs); return nn; } diff --git a/lib/expr/exparse.y b/lib/expr/exparse.y index 1d86eeda7..c02e03ce0 100644 --- a/lib/expr/exparse.y +++ b/lib/expr/exparse.y @@ -1009,7 +1009,7 @@ constant : CONSTANT if (!expr.program->disc->reff) exerror("%s: identifier references not supported", $1->name); else - $$->data.constant.value = (*expr.program->disc->reff)(expr.program, $$, $1, NULL); + $$->data.constant.value = expr.program->disc->reff(expr.program, $$, $1, NULL); } | FLOATING { diff --git a/lib/expr/extoken.c b/lib/expr/extoken.c index b736d5252..7d28466ed 100644 --- a/lib/expr/extoken.c +++ b/lib/expr/extoken.c @@ -859,7 +859,7 @@ extoken_fn(Expr_t* ex) } break; } - (*ex->disc->reff)(ex, NULL, ex_lval.id, NULL); + ex->disc->reff(ex, NULL, ex_lval.id, NULL); /*..INDENT*/ }