diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-11-14 22:07:15 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-11-15 17:52:40 +0900 |
| commit | 7998dcdedc7f1d3cfaabfc3f68ca7635f0e5e1d1 (patch) | |
| tree | 18bf31e0436da1bf1fc6cb66bb2f70ab80eedfd0 | |
| parent | b69bbf588a3dd167d62dbb89f0cef25ebae4a7ea (diff) | |
Remove invariant condition
The `while` loop condition dereferences `cfp` and no `break` there,
`cfp` cannot be NULL just after the loop.
| -rw-r--r-- | vm.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -1750,12 +1750,7 @@ 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; - } + return (VALUE *)VM_CF_LEP(cfp); } static VALUE |
