mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-07 17:46:58 +08:00
outcoff: Use nasm_zalloc helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
c13deef255
commit
b4af1ac765
@ -285,16 +285,11 @@ static int coff_make_section(char *name, uint32_t flags)
|
||||
{
|
||||
struct Section *s;
|
||||
|
||||
s = nasm_malloc(sizeof(*s));
|
||||
s = nasm_zalloc(sizeof(*s));
|
||||
|
||||
if (flags != BSS_FLAGS)
|
||||
s->data = saa_init(1);
|
||||
else
|
||||
s->data = NULL;
|
||||
s->head = NULL;
|
||||
s->tail = &s->head;
|
||||
s->len = 0;
|
||||
s->nrelocs = 0;
|
||||
if (!strcmp(name, ".text"))
|
||||
s->index = def_seg;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user