]> granicus.if.org Git - graphviz/commitdiff
remove unnecessary casts of parameters to agraphof
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Jul 2021 16:50:06 +0000 (09:50 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Jul 2021 04:58:33 +0000 (21:58 -0700)
The argument to agraphof is a void*, to which other pointers implicitly coerce.

lib/common/htmltable.c
lib/common/labels.c

index 2377f2629680a03e594c25605635e3e2b551f990..9eddd4871333ffb60e36f015130969f6315e0774 100644 (file)
@@ -2064,7 +2064,7 @@ int make_html_label(void *obj, textlabel_t * lp)
        env.g = ((Agraph_t *) obj)->root;
        break;
     case AGNODE:
-       env.g = agraphof(((Agnode_t *) obj));
+       env.g = agraphof(obj);
        break;
     case AGEDGE:
        env.g = agraphof(aghead(((Agedge_t *) obj)));
index d9ea71c86bf7367f8081b1b93d73023a680d770b..75efd40adcc88930b83a95708b91d7ce925c9c11 100644 (file)
@@ -306,7 +306,7 @@ static char *strdup_and_subst_obj0 (char *str, void *obj, int escBackslash)
            }
            break;
        case AGNODE:
-           g_str = agnameof(agraphof((node_t *)obj));
+           g_str = agnameof(agraphof(obj));
            n_str = agnameof((node_t *)obj);
            tl = ND_label((node_t *)obj);
            if (tl) {