From: Matthew Fernandez Date: Thu, 3 Feb 2022 04:06:12 +0000 (+1100) Subject: dot2gxl: de-dupe 'gcalloc' implementation X-Git-Tag: 3.0.0~43^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3cb881fcb152d13a939a0de33622ab9842904db;p=graphviz dot2gxl: de-dupe 'gcalloc' implementation --- 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))