From: Matthew Fernandez Date: Wed, 14 Sep 2022 01:34:19 +0000 (-0700) Subject: dotgen swap_bezier: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~38^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18cdf23bc4f920bcd1657e44d742883f1caf353d;p=graphviz dotgen swap_bezier: 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 2cac2a95c..d5e7ade1f 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -196,7 +197,7 @@ static void swap_bezier(bezier * old, bezier * new) int i, sz; sz = old->size; - list = N_GNEW(sz, pointf); + list = gv_calloc(sz, sizeof(pointf)); lp = list; olp = old->list + (sz - 1); for (i = 0; i < sz; i++) { /* reverse list of points */