From: Matthew Fernandez Date: Wed, 14 Sep 2022 01:24:25 +0000 (-0700) Subject: dotgen applyPacking2: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~38^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=770ac6656808374d42d771a7300550b456ca42b8;p=graphviz dotgen applyPacking2: 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/aspect.c b/lib/dotgen/aspect.c index 8b7440f31..7457a7e2b 100644 --- a/lib/dotgen/aspect.c +++ b/lib/dotgen/aspect.c @@ -430,7 +430,7 @@ static void applyPacking2(graph_t * g) { int i; - sortedLayerIndex = N_NEW(agnnodes(g), int); + sortedLayerIndex = gv_calloc(agnnodes(g), sizeof(int)); for (i = 0; i < agnnodes(g); i++) { sortedLayerIndex[i] = i;