From: Matthew Fernandez Date: Fri, 2 Sep 2022 01:46:04 +0000 (-0700) Subject: smyrna mTestgvpr: use cgraph wrapper for allocation X-Git-Tag: 6.0.1~13^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed83d5ccbe227be73b115f1069b01cbf5333429c;p=graphviz smyrna mTestgvpr: 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/gui/menucallbacks.c b/cmd/smyrna/gui/menucallbacks.c index 3c4846b09..614989e27 100644 --- a/cmd/smyrna/gui/menucallbacks.c +++ b/cmd/smyrna/gui/menucallbacks.c @@ -8,6 +8,7 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ +#include #include "menucallbacks.h" #include "viewport.h" #include "tvnodes.h" @@ -15,7 +16,6 @@ #include "gvprpipe.h" #include "topviewsettings.h" #include "gltemplate.h" -#include #include #include #include @@ -305,7 +305,7 @@ void mTestgvpr(GtkWidget * widget, gpointer user_data) argc++; } else cloneGraph = 0; - argv = N_NEW(argc + 1, char *); + argv = gv_calloc(argc + 1, sizeof(char*)); j = 0; argv[j++] = "smyrna"; if (cloneGraph)