commit 0f2e0aed1d90bfad71800710bed44fc3943bc36a parent bdfb6b8772fefcd9248f916f8fa5f32b99778d2c Author: Nihal Jere <nihal@nihaljere.xyz> Date: Thu, 3 Feb 2022 13:07:59 -0600 ir: remove unnecessary variable Diffstat:
M | ir.c | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ir.c b/ir.c @@ -28,11 +28,9 @@ genblock(struct iproc *const out, const struct block *const block); static uint64_t procindex(const struct slice *const s) { - for (size_t i = 0; i < toplevel.code.len; i++) { - const struct iproc *const iproc = &toplevel.code.data[i]; - if (slice_cmp(s, &iproc->s) == 0) + for (size_t i = 0; i < toplevel.code.len; i++) + if (slice_cmp(s, &toplevel.code.data[i].s) == 0) return i; - } die("unknown function, should be unreachable"); return 0;