From: Matthew Fernandez Date: Fri, 2 Sep 2022 00:48:55 +0000 (-0700) Subject: smyrna clearGrid: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~13^2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b41c3f13353d5a1aa5a526e17c141d40649b590;p=graphviz smyrna clearGrid: 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/cmd/smyrna/tvnodes.c b/cmd/smyrna/tvnodes.c index e168684c5..75b77ffb4 100644 --- a/cmd/smyrna/tvnodes.c +++ b/cmd/smyrna/tvnodes.c @@ -12,7 +12,6 @@ #include "viewport.h" #include "topviewfuncs.h" #include -#include #include typedef struct { @@ -334,7 +333,7 @@ static void clearGrid(grid * g) static grid *initGrid(void) { - grid *gr = NEW(grid); + grid *gr = gv_alloc(sizeof(grid)); gr->columns = NULL; gr->count = 0; gr->buf = 0;