Skip to content

Commit 5455587

Browse files
authored
Update memorypool.c
1 parent 65862fe commit 5455587

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

memorypool.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ static _MP_Memory* find_memory_list(MemoryPool* mp, void* p) {
112112
}
113113

114114
static int merge_free_chunk(MemoryPool* mp, _MP_Memory* mm, _MP_Chunk* c) {
115-
if (mp == NULL || mm == NULL || c == NULL || !c->is_free) return 1;
116-
117115
_MP_Chunk *p0 = c, *p1 = c;
118116
while (p0->is_free) {
119117
p1 = p0;
@@ -360,4 +358,4 @@ float get_mempool_prog_usage(MemoryPool* mp) {
360358
#undef MP_ALIGN_SIZE
361359
#undef MP_INIT_MEMORY_STRUCT
362360
#undef MP_DLINKLIST_INS_FRT
363-
#undef MP_DLINKLIST_DEL
361+
#undef MP_DLINKLIST_DEL

0 commit comments

Comments
 (0)