diff options
author | Paul Smith <psmith@gnu.org> | 2013-05-17 01:24:19 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2013-05-17 01:24:19 -0400 |
commit | 0c3fea4023aa27ad1c3cf5aabd2b60de00a3c9c2 (patch) | |
tree | bac65e7f232282bfb8169ddd231910695aa9ad88 /hash.c | |
parent | 173fd48b743a6eb85271d62dae0be1ca025d5d76 (diff) | |
download | make-0c3fea4023aa27ad1c3cf5aabd2b60de00a3c9c2.tar.gz |
Use xcalloc() in hash.c to handle out of memory errors.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -17,7 +17,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */ #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))) |