]> granicus.if.org Git - graphviz/commitdiff
gxl2gv: [nfc] remove the need to cast 'mapLookup' parameter
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Feb 2022 01:34:19 +0000 (12:34 +1100)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Feb 2022 01:34:19 +0000 (12:34 +1100)
The equivalent of the prior commit on gxl2gv.

cmd/tools/gxl2gv.c

index bd90dcbccec2ca2817ba23149883cbb9a74b549b..8d4364afa259dc131ab08d40283ee7772c6f9e73 100644 (file)
@@ -193,8 +193,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;
@@ -504,11 +503,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;