memorypool: removed redundant check, which also fails in case shrinking

This commit is contained in:
Evgeny Grin (Karlson2k)
2019-06-13 13:36:45 +03:00
parent 04d8449af5
commit b9cba52041
+1 -2
View File
@@ -277,8 +277,7 @@ MHD_pool_reallocate (struct MemoryPool *pool,
if (pool->pos == ROUND_TO_ALIGN (old_offset + old_size))
{ /* "old" block is the last allocated block */
const size_t new_apos = ROUND_TO_ALIGN (old_offset + new_size);
if ( (new_apos > pool->end) ||
(new_apos < pool->pos) ) /* Value wrap */
if (new_apos > pool->end)
return NULL; /* No space */
pool->pos = new_apos;