mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-28 23:24:11 +02:00
Removed a redundant null pointer check.
This commit is contained in:
parent
723d900098
commit
2be892bfda
@ -233,10 +233,6 @@ inline void* zone::allocate_expand(size_t size)
|
|||||||
if (!c) return nullptr;
|
if (!c) return nullptr;
|
||||||
|
|
||||||
char* ptr = reinterpret_cast<char*>(c) + sizeof(chunk);
|
char* ptr = reinterpret_cast<char*>(c) + sizeof(chunk);
|
||||||
if (!ptr) {
|
|
||||||
::free(c);
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
c->next_ = cl->head_;
|
c->next_ = cl->head_;
|
||||||
cl->head_ = c;
|
cl->head_ = c;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user