X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ab7f29f8f9a7ad89b6a3163f913e1ee2b7889223..7aaf9ce7582bb4fe33f29c9f2a137f2c774b05f1:/src/symtab.c?ds=sidebyside diff --git a/src/symtab.c b/src/symtab.c index 1db83f63..f748fcb0 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -1,7 +1,7 @@ /* Symbol table manager for Bison. - Copyright (C) 1984, 1989, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 2000, 2001, 2002, 2004, 2005, 2006, 2007, + 2008-2009 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -672,7 +672,8 @@ symbol_from_uniqstr (const uniqstr key, location loc) { /* First insertion in the hash. */ entry = symbol_new (key, loc); - hash_insert (symbol_table, entry); + if (!hash_insert (symbol_table, entry)) + xalloc_die (); } return entry; } @@ -696,7 +697,8 @@ semantic_type_from_uniqstr (const uniqstr key) { /* First insertion in the hash. */ entry = semantic_type_new (key); - hash_insert (semantic_type_table, entry); + if (!hash_insert (semantic_type_table, entry)) + xalloc_die (); } return entry; }