]> granicus.if.org Git - graphviz/commitdiff
expr: remove dereferencing and parens around calling 'Exdisc_t.stringof'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 5 Aug 2022 04:23:19 +0000 (21:23 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 5 Aug 2022 04:23:19 +0000 (21:23 -0700)
The compiler does not need to be explicitly told how to call through a function
pointer.

lib/expr/exeval.c
lib/expr/exgram.h

index 645013eed57ad5d257cbfba0d6eb0fe074706ffe..2d4e6c448eedac2eb88e54c4fb7f57be1d6e9c78 100644 (file)
@@ -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));
index a58d43a1b6e365f1e1afe363e2ab692bb1c75835..ea05255de8a2172eb853c6192a8807f049f3b1ad 100644 (file)
@@ -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