From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: neatogen cAdjust: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42f657bf3c6e7ba2623a5aa6d993fefb6f479da0;p=graphviz neatogen cAdjust: 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/constraint.c b/lib/neatogen/constraint.c index 87d19cfae..e8cb838a2 100644 --- a/lib/neatogen/constraint.c +++ b/lib/neatogen/constraint.c @@ -10,6 +10,7 @@ #include "config.h" +#include #include #include #include @@ -566,7 +567,7 @@ int cAdjust(graph_t * g, int mode) { expand_t margin; int ret, i, nnodes = agnnodes(g); - nitem *nlist = N_GNEW(nnodes, nitem); + nitem *nlist = gv_calloc(nnodes, sizeof(nitem)); nitem *p = nlist; node_t *n;