diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-06-13 13:36:45 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-06-13 13:36:45 +0300 |
commit | b9cba520417ae7b01bbd59b16a4b180eab3338ae (patch) | |
tree | c4050bc27ec9d9c03a467c23c9250cc113a39436 | |
parent | 04d8449af5d2908adce7dfae256bbc0694b8552f (diff) | |
download | libmicrohttpd-b9cba520417ae7b01bbd59b16a4b180eab3338ae.tar.gz libmicrohttpd-b9cba520417ae7b01bbd59b16a4b180eab3338ae.zip |
memorypool: removed redundant check, which also fails in case shrinking
-rw-r--r-- | src/microhttpd/memorypool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c index c7541cda..12a22f22 100644 --- a/src/microhttpd/memorypool.c +++ b/src/microhttpd/memorypool.c | |||
@@ -277,8 +277,7 @@ MHD_pool_reallocate (struct MemoryPool *pool, | |||
277 | if (pool->pos == ROUND_TO_ALIGN (old_offset + old_size)) | 277 | if (pool->pos == ROUND_TO_ALIGN (old_offset + old_size)) |
278 | { /* "old" block is the last allocated block */ | 278 | { /* "old" block is the last allocated block */ |
279 | const size_t new_apos = ROUND_TO_ALIGN (old_offset + new_size); | 279 | const size_t new_apos = ROUND_TO_ALIGN (old_offset + new_size); |
280 | if ( (new_apos > pool->end) || | 280 | if (new_apos > pool->end) |
281 | (new_apos < pool->pos) ) /* Value wrap */ | ||
282 | return NULL; /* No space */ | 281 | return NULL; /* No space */ |
283 | 282 | ||
284 | pool->pos = new_apos; | 283 | pool->pos = new_apos; |