1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: use struct initializer

This commit is contained in:
Zdenek Kabelac 2014-02-14 21:36:56 +01:00
parent a508786664
commit 6e2f706233

View File

@ -3110,14 +3110,13 @@ int dm_tree_node_add_raid_target(struct dm_tree_node *node,
uint64_t rebuilds, uint64_t rebuilds,
uint64_t flags) uint64_t flags)
{ {
struct dm_tree_node_raid_params params; struct dm_tree_node_raid_params params = {
.raid_type = raid_type,
memset(&params, 0, sizeof(params)); .region_size = region_size,
params.raid_type = raid_type; .stripe_size = stripe_size,
params.region_size = region_size; .rebuilds = rebuilds,
params.stripe_size = stripe_size; .flags = flags
params.rebuilds = rebuilds; };
params.flags = flags;
return dm_tree_node_add_raid_target_with_params(node, size, &params); return dm_tree_node_add_raid_target_with_params(node, size, &params);
} }