From a3cb881fcb152d13a939a0de33622ab9842904db Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 3 Feb 2022 15:06:12 +1100 Subject: [PATCH] dot2gxl: de-dupe 'gcalloc' implementation --- cmd/tools/gxl2gv.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cmd/tools/gxl2gv.c b/cmd/tools/gxl2gv.c index 7b29acf66..bd90dcbcc 100644 --- a/cmd/tools/gxl2gv.c +++ b/cmd/tools/gxl2gv.c @@ -12,6 +12,7 @@ #include "convert.h" #include #include +#include #ifdef HAVE_EXPAT #include #include @@ -52,16 +53,6 @@ struct slist { char buf[1]; }; -static void *gcalloc(size_t nmemb, size_t size) -{ - char *rv = calloc(nmemb, size); - if (rv == NULL) { - fprintf(stderr, "out of memory\n"); - graphviz_exit(EXIT_FAILURE); - } - return rv; -} - /* Round x up to next multiple of y, which is a power of 2 */ #define ROUND2(x,y) (((x) + ((y)-1)) & ~((y)-1)) -- 2.40.0