From 398058a8738fc6a2f0051b236a907cb621aefabc Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Fri, 17 May 2013 01:24:19 -0400 Subject: Use xcalloc() in hash.c to handle out of memory errors. --- hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hash.c') diff --git a/hash.c b/hash.c index d1c2fac..ca2d02d 100644 --- a/hash.c +++ b/hash.c @@ -17,7 +17,7 @@ this program. If not, see . */ #include "makeint.h" #include "hash.h" -#define CALLOC(t, n) ((t *) calloc (sizeof (t), (n))) +#define CALLOC(t, n) ((t *) xcalloc (sizeof (t) * (n))) #define MALLOC(t, n) ((t *) xmalloc (sizeof (t) * (n))) #define REALLOC(o, t, n) ((t *) xrealloc ((o), sizeof (t) * (n))) #define CLONE(o, t, n) ((t *) memcpy (MALLOC (t, (n)), (o), sizeof (t) * (n))) -- cgit v1.2.3