From: Matthew Fernandez Date: Wed, 14 Sep 2022 01:36:42 +0000 (-0700) Subject: dotgen makeSimpleFlatLabels: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~38^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=216786cf5734748986c021b3abfb0d958ab772fb;p=graphviz dotgen makeSimpleFlatLabels: 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/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index 881b66125..99b0a7c18 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -1073,7 +1073,7 @@ makeSimpleFlatLabels (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, double uminx, umaxx; double lminx=0.0, lmaxx=0.0; - edge_t** earray = N_NEW(cnt, edge_t*); + edge_t** earray = gv_calloc(cnt, sizeof(edge_t*)); for (i = 0; i < cnt; i++) { earray[i] = edges[ind + i];