From c194716f820e7cc5784d78a457d90e3d31e9dd6d Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 25 Dec 2022 21:41:23 -0800 Subject: [PATCH] neatogen shortest_path: 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/neatogen/stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neatogen/stuff.c b/lib/neatogen/stuff.c index d1ac1bc99..bb25513ef 100644 --- a/lib/neatogen/stuff.c +++ b/lib/neatogen/stuff.c @@ -651,7 +651,7 @@ void shortest_path(graph_t * G, int nG) { node_t *v; - Heap = N_NEW(nG + 1, node_t *); + Heap = gv_calloc(nG + 1, sizeof(node_t*)); if (Verbose) { fprintf(stderr, "Calculating shortest paths: "); start_timer(); -- 2.50.1