static struct coff_scope *
empty_scope (void)
{
- return (struct coff_scope *) (xcalloc (sizeof (struct coff_scope), 1));
+ return (struct coff_scope *) (xcalloc (1, sizeof (struct coff_scope)));
}
static struct coff_symbol *
empty_symbol (void)
{
- return (struct coff_symbol *) (xcalloc (sizeof (struct coff_symbol), 1));
+ return (struct coff_symbol *) (xcalloc (1, sizeof (struct coff_symbol)));
}
static void
static struct coff_line *
do_lines (int i, char *name ATTRIBUTE_UNUSED)
{
- struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1);
+ struct coff_line *res = (struct coff_line *) xcalloc (1, sizeof (struct coff_line));
asection *s;
unsigned int l;
/* Add two extra records, one for the prologue and one for the epilogue. */
c += 1;
res->nlines = c;
- res->lines = (int *) (xcalloc (sizeof (int), c));
- res->addresses = (int *) (xcalloc (sizeof (int), c));
+ res->lines = (int *) (xcalloc (c, sizeof (int)));
+ res->addresses = (int *) (xcalloc (c, sizeof (int)));
res->lines[0] = start_line;
res->addresses[0] = rawsyms[i].u.syment.n_value - s->vma;
for (c = 0;
struct coff_sfile *n =
(struct coff_sfile *) xmalloc (sizeof (struct coff_sfile));
- n->section = (struct coff_isection *) xcalloc (sizeof (struct coff_isection), abfd->section_count + 1);
+ n->section = (struct coff_isection *) xcalloc (abfd->section_count + 1, sizeof (struct coff_isection));
cur_sfile = n;
n->name = N(sym);
n->next = 0;
bfd_fatal (bfd_get_filename (abfd));
rawsyms = obj_raw_syments (abfd);
rawcount = obj_raw_syment_count (abfd);
- tindex = (struct coff_symbol **) (xcalloc (sizeof (struct coff_symbol *), rawcount));
+ tindex = (struct coff_symbol **) (xcalloc (rawcount,
+ sizeof (struct coff_symbol *)));
p = doit ();
return p;