diff options
Diffstat (limited to 'lib/sqfs/xattr')
-rw-r--r-- | lib/sqfs/xattr/xattr_reader.c | 3 | ||||
-rw-r--r-- | lib/sqfs/xattr/xattr_writer.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/sqfs/xattr/xattr_reader.c b/lib/sqfs/xattr/xattr_reader.c index a55ad2f..313da88 100644 --- a/lib/sqfs/xattr/xattr_reader.c +++ b/lib/sqfs/xattr/xattr_reader.c @@ -347,7 +347,6 @@ sqfs_xattr_reader_t *sqfs_xattr_reader_create(sqfs_u32 flags) if (xr == NULL) return NULL; - ((sqfs_object_t *)xr)->copy = xattr_reader_copy; - ((sqfs_object_t *)xr)->destroy = xattr_reader_destroy; + sqfs_object_init(xr, xattr_reader_destroy, xattr_reader_copy); return xr; } diff --git a/lib/sqfs/xattr/xattr_writer.c b/lib/sqfs/xattr/xattr_writer.c index c49aaf1..39e1b05 100644 --- a/lib/sqfs/xattr/xattr_writer.c +++ b/lib/sqfs/xattr/xattr_writer.c @@ -95,6 +95,8 @@ sqfs_xattr_writer_t *sqfs_xattr_writer_create(sqfs_u32 flags) if (xwr == NULL) return NULL; + sqfs_object_init(xwr, xattr_writer_destroy, xattr_writer_copy); + if (str_table_init(&xwr->keys)) goto fail_keys; @@ -112,9 +114,6 @@ sqfs_xattr_writer_t *sqfs_xattr_writer_create(sqfs_u32 flags) } xwr->kv_block_tree.key_context = xwr; - - ((sqfs_object_t *)xwr)->copy = xattr_writer_copy; - ((sqfs_object_t *)xwr)->destroy = xattr_writer_destroy; return xwr; fail_tree: array_cleanup(&xwr->kv_pairs); |