aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-09-03 16:22:50 -0700
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-03 23:22:50 +0000
commit3de900268edfcbeb0b286cc0119b778e1050a028 (patch)
tree3eb337eba34d2d4c91a5e74dbcce64f57595bd4b /gcc/stmt.c
parent818a3b1591f335fe4d781637297246d7e9cda583 (diff)
downloadgcc-3de900268edfcbeb0b286cc0119b778e1050a028.zip
gcc-3de900268edfcbeb0b286cc0119b778e1050a028.tar.gz
gcc-3de900268edfcbeb0b286cc0119b778e1050a028.tar.bz2
dbxout.c (dbxout_init): Use xcalloc instead of xmalloc+bzero.
* 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. From-SVN: r29091
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 64b9232..255d635 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++)
{