summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-03 23:22:50 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-03 23:22:50 +0000
commita559f7c8f6eb6245c0efcd32a5027e912b03eac5 (patch)
tree3eb337eba34d2d4c91a5e74dbcce64f57595bd4b /gcc/stmt.c
parent9ece79715feb4928f7f747c4581d8dcfc782bd85 (diff)
downloadgcc-a559f7c8f6eb6245c0efcd32a5027e912b03eac5.tar.gz
* dbxout.c (dbxout_init): Use xcalloc instead of xmalloc+bzero.
* dwarf2out.c (dwarf2out_frame_init): Likewise. * final.c (shorten_branches): Likewise. * global.c (global_alloc): Likewise. * haifa-sched.c (build_control_flow): Likewise. * stmt.c (check_for_full_enumeration_handling): Likewise. (estimate_case_costs): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29091 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 64b9232c5b1..255d635fbbb 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -4900,12 +4900,11 @@ check_for_full_enumeration_handling (type)
bytes_needed = (size + HOST_BITS_PER_CHAR) / HOST_BITS_PER_CHAR;
if (size > 0 && size < 600000
- /* We deliberately use malloc here - not xmalloc. */
- && (cases_seen = (unsigned char *) malloc (bytes_needed)) != NULL)
+ /* We deliberately use calloc here - not xcalloc. */
+ && (cases_seen = (unsigned char *) calloc (bytes_needed, 1)) != NULL)
{
long i;
tree v = TYPE_VALUES (type);
- bzero (cases_seen, bytes_needed);
/* The time complexity of this code is normally O(N), where
N being the number of members in the enumerated type.
@@ -5469,8 +5468,7 @@ estimate_case_costs (node)
if (cost_table == NULL)
{
- cost_table = ((short *) xmalloc (129 * sizeof (short))) + 1;
- bzero ((char *) (cost_table - 1), 129 * sizeof (short));
+ cost_table = ((short *) xcalloc (129, sizeof (short))) + 1;
for (i = 0; i < 128; i++)
{