mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 13:02:13 +01:00
Merge pull request #62 from redboltz/remove_redundant_null_check
Removed a redundant null check.
This commit is contained in:
commit
9d82356ea9
@ -86,10 +86,6 @@ void* msgpack_zone_malloc_expand(msgpack_zone* zone, size_t size)
|
|||||||
sizeof(msgpack_zone_chunk) + sz);
|
sizeof(msgpack_zone_chunk) + sz);
|
||||||
if (chunk == NULL) return NULL;
|
if (chunk == NULL) return NULL;
|
||||||
char* ptr = ((char*)chunk) + sizeof(msgpack_zone_chunk);
|
char* ptr = ((char*)chunk) + sizeof(msgpack_zone_chunk);
|
||||||
if (ptr == NULL) {
|
|
||||||
free(chunk);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
chunk->next = cl->head;
|
chunk->next = cl->head;
|
||||||
cl->head = chunk;
|
cl->head = chunk;
|
||||||
cl->free = sz - size;
|
cl->free = sz - size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user