From: Matthew Fernandez Date: Sun, 4 Sep 2022 19:34:11 +0000 (-0700) Subject: core plugin write_edges: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~9^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=19b5d0b31d67fe3f1ca4865f46e22147d37f255a;p=graphviz core plugin write_edges: 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/plugin/core/gvrender_core_json.c b/plugin/core/gvrender_core_json.c index 921db8fbc..560337fcc 100644 --- a/plugin/core/gvrender_core_json.c +++ b/plugin/core/gvrender_core_json.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -476,7 +477,7 @@ static int write_edges(Agraph_t * g, GVJ_t * job, int top, state_t* sp) return 0; } - Agedge_t **edges = gcalloc(count, sizeof(Agedge_t *)); + Agedge_t **edges = gv_calloc(count, sizeof(Agedge_t *)); size_t i = 0; for (Agnode_t *np = agfstnode(g); np; np = agnxtnode(g, np)) {