From: Matthew Fernandez Date: Fri, 2 Sep 2022 00:53:09 +0000 (-0700) Subject: smyrna update_tree: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~13^2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0572bcff7832df94a2502b9bfcfb44c3cfdde299;p=graphviz smyrna update_tree: 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 ac9e9fa82..e168684c5 100644 --- a/cmd/smyrna/tvnodes.c +++ b/cmd/smyrna/tvnodes.c @@ -292,7 +292,7 @@ static GtkTreeView *update_tree(GtkTreeView * tree, grid * g) } if (g->count > 0) { - types = N_NEW(g->count, GType); + types = gv_calloc(g->count, sizeof(GType)); for (id = 0; id < g->count; id++) types[id] = g->columns[id]->type; store = update_tree_store(g->store, g->count, types);