Skip to content

Commit 806e554

Browse files
committed
Compare with the upper bound of the loop variable
Fix sign-compare warning
1 parent 3bd9583 commit 806e554

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gc/default/default.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9448,7 +9448,7 @@ rb_gc_impl_objspace_init(void *objspace_ptr)
94489448
(bits_t)0x0101010101010101ULL, // i=3: every 8th bit
94499449
(bits_t)0x0001000100010001ULL, // i=4: every 16th bit
94509450
};
9451-
GC_ASSERT(i < sizeof(slot_bits_masks) / sizeof(slot_bits_masks[0]));
9451+
GC_ASSERT(HEAP_COUNT == sizeof(slot_bits_masks) / sizeof(slot_bits_masks[0]));
94529452
heap->slot_bits_mask = slot_bits_masks[i];
94539453

94549454
ccan_list_head_init(&heap->pages);

0 commit comments

Comments
 (0)