summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-29 08:44:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-29 08:44:16 +0000
commitc81f5fd3260ba1b21b343be487d4865e068f47ff (patch)
tree611ac6a45eaf4b4e28b592e77aa3f9b661c59a23 /vm.c
parent6a8808011f93c81f11ddffa9131689968a70ad75 (diff)
* vm.c (VM_EP_LEP): simplify infinite loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vm.c b/vm.c
index b4132cda8b..5636f80752 100644
--- a/vm.c
+++ b/vm.c
@@ -24,12 +24,10 @@
static inline VALUE *
VM_EP_LEP(VALUE *ep)
{
- while (1) {
- if (VM_EP_LEP_P(ep)) {
- return ep;
- }
+ while (!VM_EP_LEP_P(ep)) {
ep = VM_EP_PREV_EP(ep);
}
+ return ep;
}
VALUE *