From 7c028e224978e1d5a4f207cc42b9eb58d81897dd Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 23 Aug 2019 01:33:50 +0200 Subject: Some simple search/replace cases for allocation This commit exchanges some malloc(x + y * z) patterns that can be found with a simple git grep and are obvious for the new wrappers. Signed-off-by: David Oberhollenzer --- lib/comp/create_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/comp/create_block.c') diff --git a/lib/comp/create_block.c b/lib/comp/create_block.c index e410091..90344bb 100644 --- a/lib/comp/create_block.c +++ b/lib/comp/create_block.c @@ -16,7 +16,7 @@ block_t *create_block(const char *filename, int fd, size_t size, void *user, uint32_t flags) { - block_t *blk = calloc(1, sizeof(*blk) + size); + block_t *blk = alloc_flex(sizeof(*blk), 1, size); if (blk == NULL) { perror(filename); -- cgit v1.2.3