Skip to content

Commit

Permalink
lib: Rename a alloconly mempool helper function to make its scope obv…
Browse files Browse the repository at this point in the history
…ious

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.
  • Loading branch information
Josef 'Jeff' Sipek authored and sirainen committed Jul 4, 2018
1 parent efdab4d commit 6dbfca2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/mempool-alloconly.c
Expand Up @@ -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) +
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6dbfca2

Please sign in to comment.