Skip to content

Commit

Permalink
Remove unneeded cast
Browse files Browse the repository at this point in the history
`start` is of type uintptr_t so it does not need to be casted to VALUE.
  • Loading branch information
peterzhu2118 committed May 4, 2022
1 parent 9d61c45 commit bff31b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gc.c
Expand Up @@ -2099,7 +2099,7 @@ heap_page_allocate(rb_objspace_t *objspace, rb_size_pool_t *size_pool)
/* adjust obj_limit (object number available in this page) */
start = (uintptr_t)((VALUE)page_body + sizeof(struct heap_page_header));

if ((VALUE)start % BASE_SLOT_SIZE != 0) {
if (start % BASE_SLOT_SIZE != 0) {
int delta = BASE_SLOT_SIZE - (start % BASE_SLOT_SIZE);
start = start + delta;
GC_ASSERT(NUM_IN_PAGE(start) == 0 || NUM_IN_PAGE(start) == 1);
Expand Down

0 comments on commit bff31b3

Please sign in to comment.