}
else
{
- lpe = (struct s390_lpe *) xmalloc (sizeof (struct s390_lpe));
+ lpe = XNEW (struct s390_lpe);
}
lpe->ex = *exp_p;
s390_machine (int ignore ATTRIBUTE_UNUSED)
{
char *cpu_string;
- static struct
+ static struct cpu_history
{
unsigned int cpu;
unsigned int flags;
if (strcmp (cpu_string, "push") == 0)
{
if (cpu_history == NULL)
- cpu_history = xmalloc (MAX_HISTORY * sizeof (*cpu_history));
+ cpu_history = XNEWVEC (struct cpu_history, MAX_HISTORY);
if (curr_hist >= MAX_HISTORY)
as_bad (_(".machine stack overflow"));
if (strcmp (mode_string, "push") == 0)
{
if (mode_history == NULL)
- mode_history = xmalloc (MAX_HISTORY * sizeof (*mode_history));
+ mode_history = XNEWVEC (unsigned int, MAX_HISTORY);
if (curr_hist >= MAX_HISTORY)
as_bad (_(".machinemode stack overflow"));
code = BFD_RELOC_390_GOTPCDBL;
}
- reloc = (arelent *) xmalloc (sizeof (arelent));
- reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ reloc = XNEW (arelent);
+ 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->howto = bfd_reloc_type_lookup (stdoutput, code);