From: erg Date: Wed, 14 Oct 2009 19:45:03 +0000 (+0000) Subject: Fix bug in NEW macro used locally X-Git-Tag: LAST_LIBGRAPH~32^2~1653 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d879d3517ef3654a22b9106aa77fc0eba0e9e0b2;p=graphviz Fix bug in NEW macro used locally --- diff --git a/lib/xdot/xdot.c b/lib/xdot/xdot.c index 551b06cee..92ae4dddf 100755 --- a/lib/xdot/xdot.c +++ b/lib/xdot/xdot.c @@ -18,8 +18,8 @@ #include #include -#define NEW(t) (t*)malloc(sizeof(t)) -#define N_NEW(n,t) (t*)malloc((n)*sizeof(t)) +#define NEW(t) (t*)calloc(1, sizeof(t)) +#define N_NEW(n,t) (t*)calloc((n),sizeof(t)) /* the parse functions should return NULL on error */ static char *parseReal(char *s, double *fp)