From: Matthew Fernandez Date: Fri, 18 Nov 2022 01:14:41 +0000 (-0800) Subject: neatogen makeSelfArcs: use cgraph wrapper for allocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=295b3aa7832dd1c459f798cfc1f3b4e661ae2e38;p=graphviz neatogen makeSelfArcs: 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/neatogen/neatosplines.c b/lib/neatogen/neatosplines.c index 576616332..771ab97eb 100644 --- a/lib/neatogen/neatosplines.c +++ b/lib/neatogen/neatosplines.c @@ -245,7 +245,7 @@ void makeSelfArcs(edge_t * e, int stepx) makePortLabels(e); } else { int i; - edge_t **edges = N_GNEW(cnt, edge_t *); + edge_t **edges = gv_calloc(cnt, sizeof(edge_t*)); for (i = 0; i < cnt; i++) { edges[i] = e; e = ED_to_virt(e);