summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/xcalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/xcalloc.c')
-rw-r--r--Build/source/texk/kpathsea/xcalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/xcalloc.c b/Build/source/texk/kpathsea/xcalloc.c
index e01eb9c8da4..0d01c1bcd15 100644
--- a/Build/source/texk/kpathsea/xcalloc.c
+++ b/Build/source/texk/kpathsea/xcalloc.c
@@ -1,6 +1,6 @@
/* xcalloc.c: calloc with error checking.
- Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 1992, 1993, 2008, 2010 Karl Berry.
Copyright 2005 Olaf Weber.
This library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
void *
xcalloc (unsigned nelem, unsigned elsize)
{
- void *new_mem = (void*)calloc(nelem, elsize);
+ void *new_mem = (void*)calloc(nelem ? nelem : 1, elsize ? elsize : 1);
if (new_mem == NULL) {
fprintf(stderr,