From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: neatogen newitem: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=629d81d14ea1d60ffaae8477cb10a886756b1a99;p=graphviz neatogen newitem: 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/neatogen/neatosplines.c b/lib/neatogen/neatosplines.c index 487ee49b8..576616332 100644 --- a/lib/neatogen/neatosplines.c +++ b/lib/neatogen/neatosplines.c @@ -115,7 +115,7 @@ static void *newitem(Dt_t * d, edgeitem * obj, Dtdisc_t * disc) (void)d; (void)disc; - newp = NEW(edgeitem); + newp = gv_alloc(sizeof(edgeitem)); newp->id = obj->id; newp->e = obj->e; ED_count(newp->e) = 1;