]> granicus.if.org Git - graphviz/commitdiff
expr: remove dereferencing and parens around calling 'Exdisc_t.reff'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 5 Aug 2022 03:56:27 +0000 (20:56 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Aug 2022 17:10:31 +0000 (10:10 -0700)
The compiler does not need to be explicitly told how to call through a function
pointer.

lib/expr/exgram.h
lib/expr/exparse.y
lib/expr/extoken.c

index cf5dad23b50cef7619f4093bceeed281f35cd015..680bd5c498e41b84a96dc82ce6713e8b6541a27f 100644 (file)
@@ -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;
 }
index 1d86eeda72cbb81163b12b4678d23ac4de133531..c02e03ce02035af8299509544a6416f96ed4727c 100644 (file)
@@ -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
                {
index b736d5252f0aa1738a1639a1888889588af4bea2..7d28466ed8a9bc4b61e07131281c6e59be6d47bd 100644 (file)
@@ -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*/
                                        }