From a0612e526211a30907a1dd9dbaa144a8d6af2770 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 3 Sep 2022 10:56:31 -0700 Subject: [PATCH] ortho addChan: 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/ortho/ortho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ortho/ortho.c b/lib/ortho/ortho.c index 8c833cdcc..3bf654797 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -343,7 +343,7 @@ addChan (Dt_t* chdict, channel* cp, double j) chanItem* subd = dtmatch (chdict, &j); if (!subd) { - subd = NEW (chanItem); + subd = gv_alloc(sizeof(chanItem)); subd->v = j; subd->chans = dtopen (&chanDisc, Dtoset); dtinsert (chdict, subd); -- 2.40.0