diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-23 01:33:50 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-23 02:09:51 +0200 |
commit | 7c028e224978e1d5a4f207cc42b9eb58d81897dd (patch) | |
tree | d7165e3b9d1a7041cd79712526ad472c21135bdc /lib/sqfs/data_writer.c | |
parent | 0a5383ccdf8e87d2259d02a9ff44420b3bc3f58d (diff) |
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/data_writer.c')
-rw-r--r-- | lib/sqfs/data_writer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqfs/data_writer.c b/lib/sqfs/data_writer.c index b52e897..d4b402b 100644 --- a/lib/sqfs/data_writer.c +++ b/lib/sqfs/data_writer.c @@ -416,7 +416,7 @@ int write_data_from_fd_condensed(data_writer_t *data, file_info_t *fi, diff = fi->size - offset; } - blk = calloc(1, sizeof(*blk) + diff); + blk = alloc_flex(sizeof(*blk), 1, diff); blk->size = diff; blk->index = i++; blk->user = fi; |