From: Matthew Fernandez Date: Sat, 3 Sep 2022 18:00:14 +0000 (-0700) Subject: ortho construct_trapezoids: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~11^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3f92a7b655063ba9077c57ff19733c2cbe4c709;p=graphviz ortho construct_trapezoids: 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/trapezoid.c b/lib/ortho/trapezoid.c index 8ea4358b9..1363ea6fa 100644 --- a/lib/ortho/trapezoid.c +++ b/lib/ortho/trapezoid.c @@ -18,14 +18,13 @@ #include "config.h" - +#include #include #include #include #include #include #include -#include #include #include @@ -1028,7 +1027,7 @@ construct_trapezoids(int nseg, segment_t* seg, int* permute, int ntraps, QSIZE = 2*ntraps; TRSIZE = ntraps; - qs = N_NEW (2*ntraps, qnode_t); + qs = gv_calloc(2 * ntraps, sizeof(qnode_t)); q_idx = tr_idx = 1; memset(tr, 0, ntraps*sizeof(trap_t));