From: Matthew Fernandez Date: Wed, 14 Sep 2022 01:37:36 +0000 (-0700) Subject: dotgen make_flat_adj_edges: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~38^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc8c0d7cffa15cff4b7fd3b05d1c89b4df6fe1b7;p=graphviz dotgen make_flat_adj_edges: 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 99b0a7c18..f9a9f5841 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -1317,7 +1317,7 @@ make_flat_adj_edges(graph_t* g, edge_t** edges, int ind, int cnt, edge_t* e0, return; } - attrs = NEW(attr_state_t); + attrs = gv_alloc(sizeof(attr_state_t)); auxg = cloneGraph (g, attrs); subg = agsubg (auxg, "xxx",1); agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), true);