]> git.saurik.com Git - bison.git/commitdiff
(new_itemsets): Use memset rather than zeroing by hand. This avoids a
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Dec 2004 05:26:30 +0000 (05:26 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Dec 2004 05:26:30 +0000 (05:26 +0000)
warning about comparing int to size_t when GCC warnings are enabled.

src/LR0.c

index 1e3973244ad38428cddd7a4d6dc403f3efed88ea..aeb597d8d710171bb914c98ab16c964c83281727 100644 (file)
--- a/src/LR0.c
+++ b/src/LR0.c
@@ -183,8 +183,7 @@ new_itemsets (state *s)
   if (trace_flag & trace_automaton)
     fprintf (stderr, "Entering new_itemsets, state = %d\n", s->number);
 
-  for (i = 0; i < nsyms; i++)
-    kernel_size[i] = 0;
+  memset (kernel_size, 0, nsyms * sizeof *kernel_size);
 
   nshifts = 0;