From: Matthew Fernandez Date: Sat, 3 Sep 2022 17:58:02 +0000 (-0700) Subject: ortho attachOrthoEdges: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~11^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34ca1e7342b2407c51adbb09faa578332cfcc94b;p=graphviz ortho attachOrthoEdges: 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 62b3173c1..dbfe7bc83 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -1163,7 +1163,7 @@ attachOrthoEdges(maze* mp, size_t n_edges, route* route_list, splineInfo *sinfo, size_t npts = 1 + 3*rte.n; if (npts > splsz) { free (ispline); - ispline = N_GNEW(npts, pointf); + ispline = gv_calloc(npts, sizeof(pointf)); splsz = npts; }