From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: neatogen addTri: use cgraph wrapper for allocation X-Git-Tag: 7.0.3~11^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23b84b34cf8571cf9930ac2e73c6195a8874267e;p=graphviz neatogen addTri: 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/multispline.c b/lib/neatogen/multispline.c index a6a03970a..7d6c92f65 100644 --- a/lib/neatogen/multispline.c +++ b/lib/neatogen/multispline.c @@ -239,7 +239,7 @@ static void mapTri(Dt_t * map, tri * tp) static tri * addTri(int i, int j, tri * oldp) { - tri *tp = NEW(tri); + tri *tp = gv_alloc(sizeof(tri)); tp->v.i = i; tp->v.j = j; tp->nxttri = oldp;