Skip to content

Commit 4a30e71

Browse files
committed
Simplify
1 parent 3182c4f commit 4a30e71

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Zend/zend_alloc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,9 @@ static zend_always_inline void zend_mm_chunk_init(zend_mm_heap *heap, zend_mm_ch
10251025
chunk->heap = heap;
10261026
chunk->next = heap->main_chunk;
10271027
ZEND_MM_UNPOISON_CHUNK_HDR(heap->main_chunk);
1028-
ZEND_MM_UNPOISON_CHUNK_HDR(heap->main_chunk->prev);
1029-
chunk->prev = heap->main_chunk->prev;
1028+
zend_mm_chunk *prev = heap->main_chunk->prev;
1029+
ZEND_MM_UNPOISON_CHUNK_HDR(prev);
1030+
chunk->prev = prev;
10301031
chunk->prev->next = chunk;
10311032
chunk->next->prev = chunk;
10321033
/* mark first pages as allocated */
@@ -1037,7 +1038,7 @@ static zend_always_inline void zend_mm_chunk_init(zend_mm_heap *heap, zend_mm_ch
10371038
/* mark first pages as allocated */
10381039
chunk->free_map[0] = (1L << ZEND_MM_FIRST_PAGE) - 1;
10391040
chunk->map[0] = ZEND_MM_LRUN(ZEND_MM_FIRST_PAGE);
1040-
ZEND_MM_POISON_CHUNK_HDR(heap->main_chunk->prev, heap);
1041+
ZEND_MM_POISON_CHUNK_HDR(prev, heap);
10411042
ZEND_MM_POISON_CHUNK_HDR(heap->main_chunk, heap);
10421043
}
10431044

0 commit comments

Comments
 (0)