diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-02-20 22:44:06 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-02-23 14:56:48 +0100 |
commit | 5237175cb6486c782589d7c9afb4f532ee5897b1 (patch) | |
tree | d2849a71fda131387d45d863c267a7394f71d19c | |
parent | b5f906e984abea169209302b78bfa935869d6ea4 (diff) | |
download | lvm2-5237175cb6486c782589d7c9afb4f532ee5897b1.tar.gz |
cleanup: simplify initilization
Simplier code and also drop duplicate check for active LV.
-rw-r--r-- | tools/lvconvert.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 4dee97ee0..a67b4ee72 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -6126,7 +6126,7 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd, struct volume_group *vg = lv->vg; struct logical_volume *lv_wcorig; struct logical_volume *lv_fast; - struct writecache_settings settings; + struct writecache_settings settings = { 0 }; const char *fast_name; uint32_t block_size_sectors = 0; char *lockd_fast_args = NULL; @@ -6181,10 +6181,6 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd, is_active = lv_is_active(lv); - is_active = lv_is_active(lv); - - memset(&settings, 0, sizeof(settings)); - if (!get_writecache_settings(cmd, &settings, &block_size_sectors)) { log_error("Invalid writecache settings."); goto bad; |