X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/580c075d7f6a06d84149fd789a42528371621b7d..2ad7e09e963e72ac4c69bb10b866b68947197aaf:/src/muscle_tab.c diff --git a/src/muscle_tab.c b/src/muscle_tab.c index 43415716..570add70 100644 --- a/src/muscle_tab.c +++ b/src/muscle_tab.c @@ -1,7 +1,6 @@ /* Muscle table manager for Bison. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 Free Software - Foundation, Inc. + Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -121,7 +120,8 @@ muscle_insert (char const *key, char const *value) /* First insertion in the hash. */ entry = xmalloc (sizeof *entry); entry->key = key; - hash_insert (muscle_table, entry); + if (!hash_insert (muscle_table, entry)) + xalloc_die (); } else free (entry->storage); @@ -150,7 +150,8 @@ muscle_grow (const char *key, const char *val, const char *separator) /* First insertion in the hash. */ entry = xmalloc (sizeof *entry); entry->key = key; - hash_insert (muscle_table, entry); + if (!hash_insert (muscle_table, entry)) + xalloc_die (); entry->value = entry->storage = xstrdup (val); } else