From 770ac6656808374d42d771a7300550b456ca42b8 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 13 Sep 2022 18:24:25 -0700 Subject: [PATCH] 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. --- lib/dotgen/aspect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.40.0