summaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-11 21:47:39 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-11 21:47:39 +0000
commit9c985aeccc2419d2c3af8eb0a36954e4709d6ce6 (patch)
tree94bcf5915821086716a7469523e1815e7340f194 /gcc/genattrtab.c
parent5b89bf44d35ed7ec2d02d20108af48a2db19a8da (diff)
downloadgcc-9c985aeccc2419d2c3af8eb0a36954e4709d6ce6.tar.gz
* config/avr/avr.c (avr_init_once): Use xcalloc in lieu of
xmalloc/memset. * config/ia64/ia64.c (ia64_reorg): Likewise. * conflict.c (conflict_graph_new): Likewise. * fixinc/fixincl.c (run_compiles): Likewise. * genattrtab.c (optimize_attrs): Likewise. * genrecog.c (new_decision): Likewise. * haifa-sched.c (schedule_block): Likewise. * hashtable.c (ht_create): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70337 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 30a889ca70d..d34fde26213 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -3393,10 +3393,8 @@ optimize_attrs (void)
return;
/* Make 2 extra elements, for "code" values -2 and -1. */
- insn_code_values = xmalloc ((insn_code_number + 2)
- * sizeof (struct attr_value_list *));
- memset (insn_code_values, 0,
- (insn_code_number + 2) * sizeof (struct attr_value_list *));
+ insn_code_values = xcalloc ((insn_code_number + 2),
+ sizeof (struct attr_value_list *));
/* Offset the table address so we can index by -2 or -1. */
insn_code_values += 2;