summaryrefslogtreecommitdiff
path: root/mkfs/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs/block.c')
-rw-r--r--mkfs/block.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/mkfs/block.c b/mkfs/block.c
index fadf9b9..eba8c24 100644
--- a/mkfs/block.c
+++ b/mkfs/block.c
@@ -43,7 +43,6 @@ static int write_block(file_info_t *fi, sqfs_info_t *info)
static int flush_fragments(sqfs_info_t *info)
{
size_t newsz, size;
- file_info_t *fi;
uint64_t offset;
void *new, *ptr;
ssize_t ret;
@@ -65,9 +64,6 @@ static int flush_fragments(sqfs_info_t *info)
offset = info->super.bytes_used;
size = info->frag_offset;
- for (fi = info->frag_list; fi != NULL; fi = fi->frag_next)
- fi->fragment = info->num_fragments;
-
ret = info->cmp->do_block(info->cmp, info->fragment, size,
info->scratch, info->super.block_size);
if (ret < 0)
@@ -103,7 +99,6 @@ static int flush_fragments(sqfs_info_t *info)
info->super.bytes_used += size;
info->frag_offset = 0;
- info->frag_list = NULL;
info->super.flags &= ~SQFS_FLAG_NO_FRAGMENTS;
info->super.flags |= SQFS_FLAG_ALWAYS_FRAGMENTS;
@@ -118,8 +113,7 @@ static int add_fragment(file_info_t *fi, sqfs_info_t *info, size_t size)
}
fi->fragment_offset = info->frag_offset;
- fi->frag_next = info->frag_list;
- info->frag_list = fi;
+ fi->fragment = info->num_fragments;
memcpy((char *)info->fragment + info->frag_offset, info->block, size);
info->frag_offset += size;