aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-20 08:13:28 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-20 08:13:28 +0200
commit93f5a822b208b7df1c9a3f15685f397e0ce344aa (patch)
tree332f66e76268aed50680d4fdc6381d13067a0add /lib/sqfs
parent8b54f42d9f0513860993945184aedcbe7f00604d (diff)
Get rid of unalligned pointers
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs')
-rw-r--r--lib/sqfs/id_table_write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqfs/id_table_write.c b/lib/sqfs/id_table_write.c
index 490c2af..9a5aa48 100644
--- a/lib/sqfs/id_table_write.c
+++ b/lib/sqfs/id_table_write.c
@@ -5,6 +5,7 @@
int id_table_write(id_table_t *tbl, int outfd, sqfs_super_t *super,
compressor_t *cmp)
{
+ uint64_t start;
size_t i;
int ret;
@@ -14,7 +15,9 @@ int id_table_write(id_table_t *tbl, int outfd, sqfs_super_t *super,
super->id_count = tbl->num_ids;
ret = sqfs_write_table(outfd, super, tbl->ids, sizeof(tbl->ids[0]),
- tbl->num_ids, &super->id_table_start, cmp);
+ tbl->num_ids, &start, cmp);
+
+ super->id_table_start = start;
for (i = 0; i < tbl->num_ids; ++i)
tbl->ids[i] = le32toh(tbl->ids[i]);