From ed83d5ccbe227be73b115f1069b01cbf5333429c Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 1 Sep 2022 18:46:04 -0700 Subject: [PATCH] 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. --- cmd/smyrna/gui/menucallbacks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.50.1