From 792734885b9f7e1e8e781f5f7cbd6469f3236d99 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 17 Nov 2022 17:14:41 -0800 Subject: [PATCH] fdpgen addEdge: 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/fdpgen/layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fdpgen/layout.c b/lib/fdpgen/layout.c index cb4a7137d..9ffe682a6 100644 --- a/lib/fdpgen/layout.c +++ b/lib/fdpgen/layout.c @@ -383,7 +383,7 @@ static void addEdge(edge_t * de, edge_t * e) edge_t **el; el = (edge_t **) (ED_to_virt(de)); - el = ALLOC(cnt + 1, el, edge_t *); + el = gv_recalloc(el, cnt, cnt + 1, sizeof(edge_t*)); el[cnt] = e; ED_to_virt(de) = (edge_t *) el; ED_count(de)++; -- 2.40.0