aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff64-rs6000.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-07 15:04:49 +0000
committerAlan Modra <amodra@gmail.com>2002-06-07 15:04:49 +0000
commit9bab7074b06e5c0661db3ec95c584ff221fc61ec (patch)
treee018b581bbf2801ccb49cdcef5de6066b63c2a21 /bfd/coff64-rs6000.c
parent9758f3fc77f7b9748293b7e265d362ceaddfdfb4 (diff)
downloadgdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.zip
gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.gz
gdb-9bab7074b06e5c0661db3ec95c584ff221fc61ec.tar.bz2
Replace bfd_alloc/bfd_malloc + memset with bfd_zalloc/bfd_zmalloc
Diffstat (limited to 'bfd/coff64-rs6000.c')
-rw-r--r--bfd/coff64-rs6000.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 16b63d4..c7fe5ac 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -2264,12 +2264,10 @@ xcoff64_generate_rtinit (abfd, init, fini, rtld)
data_buffer_size = 0x0058 + initsz + finisz;
data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
data_buffer = NULL;
- data_buffer = (bfd_byte *)bfd_malloc (data_buffer_size);
+ data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size);
if (data_buffer == NULL)
return false;
- memset (data_buffer, 0, data_buffer_size);
-
if (initsz)
{
val = 0x18;
@@ -2302,8 +2300,10 @@ xcoff64_generate_rtinit (abfd, init, fini, rtld)
if (true == rtld)
string_table_size += strlen (rtld_name) + 1;
- string_table = (bfd_byte *)bfd_malloc (string_table_size);
- memset (string_table, 0, string_table_size);
+ string_table = (bfd_byte *) bfd_zmalloc (string_table_size);
+ if (string_table == NULL)
+ return false;
+
val = string_table_size;
bfd_put_32 (abfd, val, &string_table[0]);
st_tmp = string_table + 4;