aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-09-17 09:49:22 +0200
committerlemon <lsof@mailbox.org>2025-09-17 09:49:22 +0200
commit960f79fa50009fd1e95a294547e3e46494d49484 (patch)
tree93fbb3bb326f7efb8cfdfb249f0d1b76ef25d3bc /ir.c
parent3d0c49f4eb9e13e00bf12940b53da0f018c0a58c (diff)
alloc changes
Diffstat (limited to 'ir.c')
-rw-r--r--ir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ir.c b/ir.c
index 834ff45..e0d219f 100644
--- a/ir.c
+++ b/ir.c
@@ -64,9 +64,8 @@ irinit(struct function *fn)
cls2siz[KI8] = cls2siz[KF8] = 8;
cls2siz[KPTR] = targ_primsizes[TYPTR];
}
- fn->entry = fn->curblk = alloc(fn->arena, sizeof(struct block), 0);
+ fn->entry = fn->curblk = allocz(fn->arena, sizeof(struct block), 0);
fn->nblk = 1;
- memset(fn->entry, 0, sizeof *fn->entry);
fn->entry->lprev = fn->entry->lnext = fn->entry;
}