mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove unneeded cast
`start` is of type uintptr_t so it does not need to be casted to VALUE.
This commit is contained in:
parent
9d61c4519c
commit
bff31b3208
1 changed files with 1 additions and 1 deletions
2
gc.c
2
gc.c
|
@ -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) */
|
/* adjust obj_limit (object number available in this page) */
|
||||||
start = (uintptr_t)((VALUE)page_body + sizeof(struct heap_page_header));
|
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);
|
int delta = BASE_SLOT_SIZE - (start % BASE_SLOT_SIZE);
|
||||||
start = start + delta;
|
start = start + delta;
|
||||||
GC_ASSERT(NUM_IN_PAGE(start) == 0 || NUM_IN_PAGE(start) == 1);
|
GC_ASSERT(NUM_IN_PAGE(start) == 0 || NUM_IN_PAGE(start) == 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue