X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-score.c;h=f96879b3ab1beae1a5a25f4950cde03f9fa8ff00;hb=c1f61bd2b0644fc710dcfbb378a63f0b34be8903;hp=a509da7c35a5dffab06e2fad487c3a0d84178a23;hpb=585ba0408978602f9fdd8fd3c76180e838d906c2;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c index a509da7c35..f96879b3ab 100644 --- a/gas/config/tc-score.c +++ b/gas/config/tc-score.c @@ -6273,8 +6273,8 @@ s3_insert_reg (const struct s3_reg_entry *r, struct hash_control *htab) { int i = 0; int len = strlen (r->name) + 2; - char *buf = xmalloc (len); - char *buf2 = xmalloc (len); + char *buf = XNEWVEC (char, len); + char *buf2 = XNEWVEC (char, len); strcpy (buf + i, r->name); for (i = 0; buf[i]; i++) @@ -7400,10 +7400,10 @@ s3_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) bfd_reloc_code_real_type code; const char *type; - reloc = retval[0] = xmalloc (sizeof (arelent)); + reloc = retval[0] = XNEW (arelent); retval[1] = NULL; - reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); + reloc->sym_ptr_ptr = XNEW (asymbol *); *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; reloc->addend = fixp->fx_offset; @@ -7431,9 +7431,9 @@ s3_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) newval |= (((off >> 14) & 0x3) << 16); s3_md_number_to_chars (buf, newval, s3_INSN_SIZE); - retval[1] = xmalloc (sizeof (arelent)); + retval[1] = XNEW (arelent); retval[2] = NULL; - retval[1]->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); + retval[1]->sym_ptr_ptr = XNEW (asymbol *); *retval[1]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); retval[1]->address = (reloc->address + s3_RELAX_RELOC2 (fixp->fx_frag->fr_subtype));