diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-03 19:15:01 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-03-03 19:15:01 +0000 |
commit | 12668f1e31f4645d4f08946baa259bc01f0d8cd8 (patch) | |
tree | 5b1a8e6c78694a50ceec6263dd3f345e7bd02944 /usr.bin/yacc/lr0.c | |
parent | 6b7c51de98324f16663fd729c296ae67eb753259 (diff) |
Replace some loops with calloc/memset. From Michael W Bombardieri.
ok millert
Diffstat (limited to 'usr.bin/yacc/lr0.c')
-rw-r--r-- | usr.bin/yacc/lr0.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/yacc/lr0.c b/usr.bin/yacc/lr0.c index f5e553d7d80..75d1b7a907c 100644 --- a/usr.bin/yacc/lr0.c +++ b/usr.bin/yacc/lr0.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lr0.c,v 1.11 2011/04/03 20:42:54 nicm Exp $ */ +/* $OpenBSD: lr0.c,v 1.12 2012/03/03 19:15:00 nicm Exp $ */ /* $NetBSD: lr0.c,v 1.4 1996/03/19 03:21:35 jtc Exp $ */ /* @@ -296,8 +296,7 @@ new_itemsets(void) short *ksp; int symbol; - for (i = 0; i < nsyms; i++) - kernel_end[i] = 0; + memset(kernel_end, 0, nsyms * sizeof(short *)); shiftcount = 0; isp = itemset; |