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

lib/expr/exeval.c

index 5cdf90a68c4108e358b3bd7f64a4ec199c9ccdd8..49989ce6e38b47f2130eddd46cf66bdb6104d19f 100644 (file)
@@ -99,7 +99,7 @@ static int evaldyn(Expr_t *ex, Exnode_t *exnode, void *env, int delete) {
                int type = exnode->data.variable.index->type;
                if (type != STRING) {
                        if (!BUILTIN(type)) {
-                               key = (*ex->disc->keyf) (v, type);
+                               key = ex->disc->keyf(v, type);
                        } else
                                key.integer = v.integer;
                        snprintf(buf, sizeof(buf), "%llx", (unsigned long long)key.integer);
@@ -146,7 +146,7 @@ static Extype_t getdyn(Expr_t *ex, Exnode_t *exnode, void *env,
                        int type = exnode->data.variable.index->type;
                        if (type != STRING) {
                                if (!BUILTIN(type)) {
-                                       key = (*ex->disc->keyf) (v, type);
+                                       key = ex->disc->keyf(v, type);
                                } else
                                        key.integer = v.integer;
                                snprintf(buf, sizeof(buf), "%llx", (unsigned long long)key.integer);