summaryrefslogtreecommitdiff
path: root/src/common/mempool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mempool.c')
-rw-r--r--src/common/mempool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/mempool.c b/src/common/mempool.c
index c7c25098ce..f933f58440 100644
--- a/src/common/mempool.c
+++ b/src/common/mempool.c
@@ -344,7 +344,7 @@ mp_pool_new(size_t item_size, size_t chunk_capacity)
/* First, we figure out how much space to allow per item. We'll want to
* use make sure we have enough for the overhead plus the item size. */
- alloc_size = STRUCT_OFFSET(mp_allocated_t, u.mem) + item_size;
+ alloc_size = (size_t)(STRUCT_OFFSET(mp_allocated_t, u.mem) + item_size);
/* If the item_size is less than sizeof(next_free), we need to make
* the allocation bigger. */
if (alloc_size < sizeof(mp_allocated_t))