aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/memorypool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/memorypool.c')
-rw-r--r--src/microhttpd/memorypool.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c
index 29ccae23..143f10a8 100644
--- a/src/microhttpd/memorypool.c
+++ b/src/microhttpd/memorypool.c
@@ -71,7 +71,7 @@ struct MemoryPool
71 size_t end; 71 size_t end;
72 72
73 /** 73 /**
74 * MHD_NO if pool was malloc'ed, MHD_YES if mmapped. 74 * #MHD_NO if pool was malloc'ed, #MHD_YES if mmapped.
75 */ 75 */
76 int is_mmap; 76 int is_mmap;
77}; 77};
@@ -247,7 +247,7 @@ MHD_pool_reset (struct MemoryPool *pool,
247 size_t size) 247 size_t size)
248{ 248{
249 size = ROUND_TO_ALIGN (size); 249 size = ROUND_TO_ALIGN (size);
250 if (keep != NULL) 250 if (NULL != keep)
251 { 251 {
252 if (keep != pool->memory) 252 if (keep != pool->memory)
253 { 253 {
@@ -257,6 +257,9 @@ MHD_pool_reset (struct MemoryPool *pool,
257 pool->pos = size; 257 pool->pos = size;
258 } 258 }
259 pool->end = pool->size; 259 pool->end = pool->size;
260 memset (&pool->memory[size],
261 0,
262 pool->size - size);
260 return keep; 263 return keep;
261} 264}
262 265