From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: neatogen makeInfo: use cgraph wrapper for allocation X-Git-Tag: 7.0.3~1^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ec3efd5d8eca1d135c4309f2ee80b08a33f7552;p=graphviz 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. --- 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;