From: Matthew Fernandez Date: Sun, 20 Nov 2022 20:02:53 +0000 (-0800) Subject: circogen position: use cgraph wrapper for allocation X-Git-Tag: 7.0.3~2^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bd1c6b81acd448500d6c27e994ef9701678eba6;p=graphviz circogen position: 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/circogen/circpos.c b/lib/circogen/circpos.c index 79d3e02a8..1d700d2e2 100644 --- a/lib/circogen/circpos.c +++ b/lib/circogen/circpos.c @@ -10,7 +10,7 @@ #include "config.h" - +#include /* TODO: * If cut point is in exactly 2 blocks, expand block circles to overlap * especially in the case where one block is the sole child of the other. @@ -338,7 +338,7 @@ static double position(int childCount, int length, nodelist_t *path, double maxRadius = 0.0; double angle; double theta = 0.0; - posinfo_t* parents = N_NEW(childCount, posinfo_t); + posinfo_t* parents = gv_calloc(childCount, sizeof(posinfo_t)); int num_parents = 0; posinfo_t* next; posinfo_t* curr;