From: Matthew Fernandez Date: Wed, 14 Sep 2022 01:34:56 +0000 (-0700) Subject: dotgen swap_spline: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~38^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ac64fef4dd73399f08eeadeb9a6ce85fc256926;p=graphviz dotgen swap_spline: 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/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index d5e7ade1f..d42b24b2f 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -222,7 +222,7 @@ static void swap_spline(splines * s) int i, sz; sz = s->size; - list = N_GNEW(sz, bezier); + list = gv_calloc(sz, sizeof(bezier)); lp = list; olp = s->list + (sz - 1); for (i = 0; i < sz; i++) { /* reverse and swap list of beziers */