From 65145403a5e1e2afb2fd30d3214bbcd5b74d705c Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 12 Oct 2022 21:31:29 -0700 Subject: [PATCH] graphml2gv: remove 'xml_attr_name' from 'userdata_t' 1d28d7d2b4d2b2551bd1f432aa175f54a69364a4 seems to have copied this implementation of `userdata_t` from cmd/tools/gxl2gv.c without noticing the `xml_attr_name` member is never written to in graphml2gv. --- cmd/tools/graphml2gv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/tools/graphml2gv.c b/cmd/tools/graphml2gv.c index fe212decd..52e01aaa2 100644 --- a/cmd/tools/graphml2gv.c +++ b/cmd/tools/graphml2gv.c @@ -86,7 +86,6 @@ static void freeString(gv_stack_t *stk) { } typedef struct { - agxbuf xml_attr_name; agxbuf xml_attr_value; agxbuf composite_buffer; char* gname; @@ -146,7 +145,6 @@ static userdata_t *genUserdata(char* dfltname) static void freeUserdata(userdata_t * ud) { dtclose(ud->nameMap); - agxbfree(&(ud->xml_attr_name)); agxbfree(&(ud->xml_attr_value)); agxbfree(&(ud->composite_buffer)); freeString(&ud->elements); @@ -484,11 +482,10 @@ static void endElementHandler(void *userData, const char *name) ud->closedElementType = TAG_EDGE; ud->edgeinverted = FALSE; } else if (strcmp(name, "attr") == 0) { - char *name; + char *name = ""; char *value; ud->closedElementType = TAG_NONE; - name = agxbuse(&ud->xml_attr_name); value = agxbuse(&ud->xml_attr_value); setAttr(name, value, ud); -- 2.40.0