diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 6d45e083e..cede734b4 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -3110,14 +3110,13 @@ int dm_tree_node_add_raid_target(struct dm_tree_node *node, uint64_t rebuilds, uint64_t flags) { - struct dm_tree_node_raid_params params; - - memset(¶ms, 0, sizeof(params)); - params.raid_type = raid_type; - params.region_size = region_size; - params.stripe_size = stripe_size; - params.rebuilds = rebuilds; - params.flags = flags; + struct dm_tree_node_raid_params params = { + .raid_type = raid_type, + .region_size = region_size, + .stripe_size = stripe_size, + .rebuilds = rebuilds, + .flags = flags + }; return dm_tree_node_add_raid_target_with_params(node, size, ¶ms); }