From: Matthew Fernandez Date: Sat, 5 Feb 2022 01:30:21 +0000 (+1100) Subject: graphml2gv: [nfc] remove the need to cast 'isAnonGraph' parameter X-Git-Tag: 3.0.0~42^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ac482fc88bcbeb5eea0fb042afdad3b6a2a6b02;p=graphviz graphml2gv: [nfc] remove the need to cast 'isAnonGraph' parameter Equivalent of 3e09cc381e53ece08529dd35d27a7a436dd9ab0f on graphml2gv. --- diff --git a/cmd/tools/graphml2gv.c b/cmd/tools/graphml2gv.c index dfbc4ee36..b9ce6a0c9 100644 --- a/cmd/tools/graphml2gv.c +++ b/cmd/tools/graphml2gv.c @@ -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;