From 4ac347fa1b6448b888c259358b529e769516bccb Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 17 Nov 2022 17:14:41 -0800 Subject: [PATCH] circogen circomps: 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/circogen/circularinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/circogen/circularinit.c b/lib/circogen/circularinit.c index f82e59080..de77a1549 100644 --- a/lib/circogen/circularinit.c +++ b/lib/circogen/circularinit.c @@ -150,7 +150,7 @@ static Agraph_t **circomps(Agraph_t * g, int *cnt) /* Finally, add edge data to edges */ for (n = agfstnode(dg); n; n = agnxtnode(dg, n)) { for (e = agfstout(dg, n); e; e = agnxtout(dg, e)) { - ED_alg(e) = NEW(edata); + ED_alg(e) = gv_alloc(sizeof(edata)); } } -- 2.50.1