]> granicus.if.org Git - graphviz/commitdiff
graphml2gv: [nfc] remove the need to cast 'mapLookup' parameter
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Feb 2022 01:32:53 +0000 (12:32 +1100)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Feb 2022 01:32:53 +0000 (12:32 +1100)
cmd/tools/graphml2gv.c

index b9ce6a0c96bf4f9309e5a51be99630e59e4e3cad..0f511bd850aebb74f0f0dcd8a7fc75c8e1515357 100644 (file)
@@ -187,8 +187,7 @@ static void addToMap(Dt_t * map, char *name, char *uniqueName)
     objp->unique_name = strdup(uniqueName);
 }
 
-static char *mapLookup(Dt_t * nm, char *name)
-{
+static char *mapLookup(Dt_t *nm, const char *name) {
     namev_t *objp = dtmatch(nm, name);
     if (objp)
        return objp->unique_name;
@@ -482,11 +481,11 @@ startElementHandler(void *userData, const char *name, const char **atts)
        if (pos > 0)
            head = atts[pos];
 
-       tname = mapLookup(ud->nameMap, (char *) tail);
+       tname = mapLookup(ud->nameMap, tail);
        if (tname)
            tail = tname;
 
-       tname = mapLookup(ud->nameMap, (char *) head);
+       tname = mapLookup(ud->nameMap, head);
        if (tname)
            head = tname;