[前][次][番号順一覧][スレッド一覧]

ruby-changes:68859

From: Dylan <ko1@a...>
Date: Thu, 21 Oct 2021 08:14:58 +0900 (JST)
Subject: [ruby-changes:68859] 4b80358e5d (master): Fix condition in cb_align_pos which should return early when aligned

https://git.ruby-lang.org/ruby.git/commit/?id=4b80358e5d

From 4b80358e5d0c83cd2925fd458f2c83136f804e5c Mon Sep 17 00:00:00 2001
From: Dylan Thacker-Smith <Dylan.Smith@s...>
Date: Mon, 15 Mar 2021 00:19:08 -0700
Subject: Fix condition in cb_align_pos which should return early when aligned

---
 yjit_asm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/yjit_asm.c b/yjit_asm.c
index 64b002c45a..60873bb476 100644
--- a/yjit_asm.c
+++ b/yjit_asm.c
@@ -178,7 +178,7 @@ void cb_align_pos(codeblock_t* cb, uint32_t multiple) https://github.com/ruby/ruby/blob/trunk/yjit_asm.c#L178
     uint32_t rem = ((uint32_t)ptr) % multiple;
 
     // If the pointer is already aligned, stop
-    if (rem != 0)
+    if (rem == 0)
         return;
 
     // Pad the pointer by the necessary amount to align it
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]