From 5095a6517da9b57b0d2540b961e9841ad02fa8cc Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 13 Aug 2014 14:20:10 +0200 Subject: [PATCH] cleanup: simplier struct initilization --- tools/lvconvert.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 9c25bd951..d9fc749c3 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -348,9 +348,6 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd, int pagesize = lvm_getpagesize(); const char *type_str = arg_str_value(cmd, type_ARG, ""); - memset(lp, 0, sizeof(*lp)); - lp->target_attr = ~0; - if (!_check_conversion_type(cmd, type_str)) return_0; @@ -3315,7 +3312,9 @@ static int _lvconvert_merge_single(struct cmd_context *cmd, struct logical_volum int lvconvert(struct cmd_context * cmd, int argc, char **argv) { - struct lvconvert_params lp; + struct lvconvert_params lp = { + .target_attr = ~0, + }; if (!_read_params(&lp, cmd, argc, argv)) { stack; -- 2.43.5