diff options
author | Thiemo Seufer <ths@networkno.de> | 2003-06-11 20:53:32 +0000 |
---|---|---|
committer | Thiemo Seufer <ths@networkno.de> | 2003-06-11 20:53:32 +0000 |
commit | 4b0cff4e3667cb9d1e19a89863780ac02e875ecc (patch) | |
tree | 46b413a006fa3c3d77f68be5800f4d6af139098b /gas/config/tc-mips.c | |
parent | 781a750d293a5eb257dc28d1a0e75beb2b8a9e1b (diff) | |
download | gdb-4b0cff4e3667cb9d1e19a89863780ac02e875ecc.zip gdb-4b0cff4e3667cb9d1e19a89863780ac02e875ecc.tar.gz gdb-4b0cff4e3667cb9d1e19a89863780ac02e875ecc.tar.bz2 |
* config/tc-mips.c (tc_gen_reloc): Initialize retval amd reloc
with zeros.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 0ee8f73..91903d9 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -13677,9 +13677,8 @@ tc_gen_reloc (section, fixp) arelent *reloc; bfd_reloc_code_real_type code; - reloc = retval[0] = (arelent *) xmalloc (sizeof (arelent)); - retval[1] = NULL; - + memset (retval, 0, sizeof(retval)); + reloc = retval[0] = (arelent *) xcalloc (1, sizeof (arelent)); reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; @@ -13784,7 +13783,6 @@ tc_gen_reloc (section, fixp) reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; reloc->addend += fixp->fx_frag->tc_frag_data.tc_fr_offset; reloc2 = retval[1] = (arelent *) xmalloc (sizeof (arelent)); - retval[2] = NULL; reloc2->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); *reloc2->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); reloc2->address = (reloc->address @@ -13800,7 +13798,6 @@ tc_gen_reloc (section, fixp) arelent *reloc3; reloc3 = retval[2] = (arelent *) xmalloc (sizeof (arelent)); - retval[3] = NULL; *reloc3 = *reloc2; reloc3->address += 4; } |