From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: twopigen getRankseps: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12bd66556f90f6f65802d4e82c8ce138e677a41a;p=graphviz twopigen getRankseps: 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/twopigen/circle.c b/lib/twopigen/circle.c index 91488722d..05df0fc22 100644 --- a/lib/twopigen/circle.c +++ b/lib/twopigen/circle.c @@ -286,7 +286,7 @@ getRankseps (Agraph_t* g, uint64_t maxrank) char *endp; char c; uint64_t rk = 1; - double* ranks = N_NEW(maxrank+1, double); + double* ranks = gv_calloc(maxrank + 1, sizeof(double)); double xf = 0.0, delx = 0.0, d; if ((p = late_string(g, agfindgraphattr(g->root, "ranksep"), NULL))) {