]> granicus.if.org Git - graphviz/commitdiff
graphml2gv: [nfc] remove the need to cast 'isAnonGraph' parameter
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Feb 2022 01:30:21 +0000 (12:30 +1100)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 5 Feb 2022 01:30:21 +0000 (12:30 +1100)
Equivalent of 3e09cc381e53ece08529dd35d27a7a436dd9ab0f on graphml2gv.

cmd/tools/graphml2gv.c

index dfbc4ee3697865ac3b922559dbbe80783fced9a4..b9ce6a0c96bf4f9309e5a51be99630e59e4e3cad 100644 (file)
@@ -196,8 +196,7 @@ static char *mapLookup(Dt_t * nm, char *name)
        return 0;
 }
 
-static int isAnonGraph(char *name)
-{
+static int isAnonGraph(const char *name) {
     if (*name++ != '%')
        return 0;
     while (isdigit((int)*name))
@@ -446,7 +445,7 @@ startElementHandler(void *userData, const char *name, const char **atts)
            push_subg(g);
        } else {
            Agraph_t *subg;
-           if (isAnonGraph((char *) id)) {
+           if (isAnonGraph(id)) {
                static int anon_id = 1;
                snprintf(buf, sizeof(buf), "%%%d", anon_id++);
                id = buf;