From 1ec3efd5d8eca1d135c4309f2ee80b08a33f7552 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 17 Nov 2022 17:14:41 -0800 Subject: [PATCH] neatogen makeInfo: 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. --- lib/neatogen/adjust.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/neatogen/adjust.c b/lib/neatogen/adjust.c index 73497c979..97ae5fb0f 100644 --- a/lib/neatogen/adjust.c +++ b/lib/neatogen/adjust.c @@ -13,6 +13,7 @@ * order to reduce/remove node overlaps. */ +#include #include #include #include @@ -142,7 +143,7 @@ static int makeInfo(Agraph_t * graph) nsites = agnnodes(graph); geominit(); - nodeInfo = N_GNEW(nsites, Info_t); + nodeInfo = gv_calloc(nsites, sizeof(Info_t)); node = agfstnode(graph); ip = nodeInfo; -- 2.40.0