From: Matthew Fernandez Date: Sun, 25 Sep 2022 17:43:10 +0000 (-0700) Subject: smyrna gvpr_select: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~28^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0720f0fc14791f546770c5a16c1a108a93a82d2b;p=graphviz smyrna gvpr_select: 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. The commit series ending in 78a0004fd0d1350f2c34e3a770d93032882706f7 previously removed all uses of the lib/common/memory.h wrappers. But reverting 656a15f855a31acc6eeb162284b89ad3367253b9 brought another usage back in. --- diff --git a/cmd/smyrna/gui/frmobjectui.c b/cmd/smyrna/gui/frmobjectui.c index cc09dfeef..a7acf4fdc 100644 --- a/cmd/smyrna/gui/frmobjectui.c +++ b/cmd/smyrna/gui/frmobjectui.c @@ -25,7 +25,6 @@ #include #include #include -#include #include static int sel_node; @@ -722,7 +721,7 @@ static void gvpr_select(char *attrname, char *regex_str, int objType) { argc = 1; if (*bf2 != '\0') argc++; - argv = N_NEW(argc + 1, char *); + argv = gv_calloc(argc + 1, sizeof(char*)); size_t j = 0; argv[j++] = "smyrna"; argv[j++] = bf2;