From: Matthew Fernandez Date: Sun, 28 Aug 2022 15:59:58 +0000 (-0700) Subject: gxl2gv endElementHandler: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~17^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d31cd510d51c2a9a1589cbfd4ae346d8360fe2c;p=graphviz gxl2gv endElementHandler: use cgraph wrapper for allocation The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h wrappers except (1) they are header-only and (2) they live in a directory (cgraph) that is at the root of the dependency tree. The long term plan is to replace all use of lib/common/memory.h with lib/cgraph/alloc.h. --- diff --git a/cmd/tools/gxl2gv.c b/cmd/tools/gxl2gv.c index 794b09390..fb7a64009 100644 --- a/cmd/tools/gxl2gv.c +++ b/cmd/tools/gxl2gv.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #ifdef HAVE_EXPAT #include @@ -632,7 +631,7 @@ static void endElementHandler(void *userData, const char *name) if (len <= SMALLBUF) { new_name = buf; } else { - new_name = dynbuf = gcalloc(len, sizeof(char)); + new_name = dynbuf = gv_calloc(len, sizeof(char)); strcpy(new_name, GXL_COMP); } strcpy(new_name + sizeof(GXL_COMP) - 1,