From 1d31cd510d51c2a9a1589cbfd4ae346d8360fe2c Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 28 Aug 2022 08:59:58 -0700 Subject: [PATCH] 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. --- cmd/tools/gxl2gv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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, -- 2.50.1