From: Josef 'Jeff' Sipek Date: Wed, 20 Jun 2018 14:35:15 +0000 (-0400) Subject: lib: Rename a alloconly mempool helper function to make its scope obvious X-Git-Tag: 2.3.5~353 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b6864a359d739a3b236cb496b06fbe66a0036aab;p=thirdparty%2Fdovecot%2Fcore.git lib: Rename a alloconly mempool helper function to make its scope obvious pool_try_grow() makes it look like it is part of the mempool API, even though it is an internal helper specific to the alloconly pool. --- diff --git a/src/lib/mempool-alloconly.c b/src/lib/mempool-alloconly.c index 20b1508f6f..4e1b522979 100644 --- a/src/lib/mempool-alloconly.c +++ b/src/lib/mempool-alloconly.c @@ -420,7 +420,7 @@ static void pool_alloconly_free(pool_t pool, void *mem) } } -static bool pool_try_grow(struct alloconly_pool *apool, void *mem, size_t size) +static bool pool_alloconly_try_grow(struct alloconly_pool *apool, void *mem, size_t size) { /* see if we want to grow the memory we allocated last */ if (POOL_BLOCK_DATA(apool->block) + @@ -457,7 +457,7 @@ static void *pool_alloconly_realloc(pool_t pool, void *mem, new_size = MEM_ALIGN(new_size); /* see if we can directly grow it */ - if (!pool_try_grow(apool, mem, new_size)) { + if (!pool_alloconly_try_grow(apool, mem, new_size)) { /* slow way - allocate + copy */ new_mem = pool_alloconly_malloc(pool, new_size); memcpy(new_mem, mem, old_size);