From: Matthew Fernandez Date: Sat, 3 Sep 2022 17:56:31 +0000 (-0700) Subject: ortho addChan: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~11^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0612e526211a30907a1dd9dbaa144a8d6af2770;p=graphviz 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. --- 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);