Remove invariant condition

The `while` loop condition dereferences `cfp` and no `break` there,
`cfp` cannot be NULL just after the loop.
This commit is contained in:
Nobuyoshi Nakada 2023-11-14 22:07:15 +09:00
parent b69bbf588a
commit 7998dcdedc
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

5
vm.c
View File

@ -1750,13 +1750,8 @@ rb_vm_svar_lep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
}
}
if (cfp) {
return (VALUE *)VM_CF_LEP(cfp);
}
else {
return NULL;
}
}
static VALUE
vm_cfp_svar_get(const rb_execution_context_t *ec, rb_control_frame_t *cfp, VALUE key)