[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/02: memorypool: muted compiler warning and additional
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/02: memorypool: muted compiler warning and additional assert |
Date: |
Sat, 17 Apr 2021 17:09:20 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit b2b8492deef2a0ddec93b1e2b89e3300d820b76c
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Apr 17 18:03:40 2021 +0300
memorypool: muted compiler warning and additional assert
---
src/microhttpd/memorypool.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c
index 27f7f5ab..95112c96 100644
--- a/src/microhttpd/memorypool.c
+++ b/src/microhttpd/memorypool.c
@@ -149,6 +149,7 @@ MHD_pool_create (size_t max)
size_t alloc_size;
mhd_assert (max > 0);
+ alloc_size = 0;
pool = malloc (sizeof (struct MemoryPool));
if (NULL == pool)
return NULL;
@@ -201,6 +202,7 @@ MHD_pool_create (size_t max)
pool->pos = 0;
pool->end = alloc_size;
pool->size = alloc_size;
+ mhd_assert (0 < alloc_size);
return pool;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.