From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: common newItem: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7721a0c21613af9f23b98d82446a0070e9dac848;p=graphviz common 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/common/utils.c b/lib/common/utils.c index 62ed7342b..144f1c159 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -914,7 +914,7 @@ static int cmpItem(Dt_t * d, void *p1[], void *p2[], Dtdisc_t * disc) static void *newItem(Dt_t * d, item * objp, Dtdisc_t * disc) { (void)d; - item *newp = NEW(item); + item *newp = gv_alloc(sizeof(item)); (void)disc; newp->p[0] = objp->p[0];