From 18cdf23bc4f920bcd1657e44d742883f1caf353d Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 13 Sep 2022 18:34:19 -0700 Subject: [PATCH] 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. --- lib/dotgen/dotsplines.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.40.0