]> git.saurik.com Git - bison.git/blobdiff - src/reader.c
(debug_lbitset): Do not assume that bitset_word is the same width as
[bison.git] / src / reader.c
index 25877c18597897f091349d4d4d0e0827ee866459..4c968952a9b8e0a9b3a7eaff8ac58e4cdf4035c8 100644 (file)
@@ -132,8 +132,8 @@ get_merge_function (const char* name, const char* type,
   if (syms->next == NULL)
     {
       syms->next = XMALLOC (merger_list, 1);
-      syms->next->name = strdup (name);
-      syms->next->type = strdup (type);
+      syms->next->name = xstrdup (name);
+      syms->next->type = xstrdup (type);
       syms->next->next = NULL;
       merge_functions = head.next;
     }
@@ -541,9 +541,9 @@ reader (void)
     grammar = p;
   }
 
-  if (nsyms > SHRT_MAX)
+  if (SYMBOL_NUMBER_MAX < nsyms)
     fatal (_("too many symbols (tokens plus nonterminals); maximum %d"),
-          SHRT_MAX);
+          SYMBOL_NUMBER_MAX);
 
   assert (nsyms == ntokens + nvars);