From: Matthew Fernandez Date: Fri, 5 Aug 2022 04:23:19 +0000 (-0700) Subject: expr: remove dereferencing and parens around calling 'Exdisc_t.stringof' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c53026fb8354f02a94d2811b631f96a25aaf63f;p=graphviz expr: remove dereferencing and parens around calling 'Exdisc_t.stringof' The compiler does not need to be explicitly told how to call through a function pointer. --- diff --git a/lib/expr/exeval.c b/lib/expr/exeval.c index 645013eed..2d4e6c448 100644 --- a/lib/expr/exeval.c +++ b/lib/expr/exeval.c @@ -1099,7 +1099,7 @@ xPrint(Expr_t * ex, Exnode_t * expr, Extype_t v, Exnode_t * tmp) { *tmp = *expr->data.operand.left; tmp->data.constant.value = v; - if ((*ex->disc->stringof) (ex, tmp, 0, ex->disc)) + if (ex->disc->stringof(ex, tmp, 0, ex->disc)) exerror("%s: no string representation of %s value", expr->data.operand.left->data.variable.symbol->name, extypename(ex, expr->data.operand.left->type)); diff --git a/lib/expr/exgram.h b/lib/expr/exgram.h index a58d43a1b..ea05255de 100644 --- a/lib/expr/exgram.h +++ b/lib/expr/exgram.h @@ -304,7 +304,7 @@ static Exnode_t *exstringOf(Expr_t * p, Exnode_t * x) { exerror("cannot convert %s to STRING", extypename(p, type)); if (x->op != CONSTANT) { if (!BUILTIN(type)) { - if ((*p->disc->stringof) (p, x, 1, p->disc) < 0) { + if (p->disc->stringof(p, x, 1, p->disc) < 0) { exerror("cannot convert %s to STRING", extypename(p, type)); } @@ -320,7 +320,7 @@ static Exnode_t *exstringOf(Expr_t * p, Exnode_t * x) { } x = exnewnode(p, cvt, 0, STRING, x, 0); } else if (!BUILTIN(type)) { - if ((*p->disc->stringof) (p, x, 0, p->disc) < 0) + if (p->disc->stringof(p, x, 0, p->disc) < 0) exerror("cannot convert constant %s to STRING", extypename(p, x->type)); } else