master - cleanup: drop assign before use
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9fe4f2337bfaaa30e647ed1d20be7fb76d598559 Commit: 9fe4f2337bfaaa30e647ed1d20be7fb76d598559 Parent: cea441f4d1e19f170d9161203ef843c59f3fbf70 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Oct 3 13:04:16 2016 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Oct 3 17:49:55 2016 +0200
cleanup: drop assign before use
Drop unneeded assigns singe vars are set later in code before their first use (Coverity).
--- daemons/lvmetad/lvmetad-core.c | 2 +- lib/cache/lvmcache.c | 2 +- lib/metadata/raid_manip.c | 2 +- lib/metadata/thin_manip.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
daemons/lvmetad/lvmetad-core.c +1 -1
@@ -1249,8 +1249,8 @@ static int _update_metadata(lvmetad_state *s, const char *arg_name, const char *const char *old_vgid =NULL ;const char *new_vgid =NULL ;const char *new_metadata_vgid; +int new_seq;int old_seq =-1 ; -int new_seq =-1 ;int needs_repair =0 ;int abort_daemon =0 ;int retval =0 ;
lib/cache/lvmcache.c +1 -1
@@ -858,7 +858,7 @@ static void _choose_preferred_devs(struct cmd_context *cmd, struct dm_list *add_cache_devs) { char uuid[64] __attribute__((aligned(8))); -const char *reason ="none" ; +const char *reason;struct dm_list altdevs;struct dm_list new_unused;struct dev_types *dt = cmd->dev_types;
lib/metadata/raid_manip.c +1 -1
@@ -956,7 +956,7 @@ static int _raid_add_images(struct logical_volume *lv, int commit, int use_existing_area_len) { int rebuild_flag_cleared = 0; -struct lv_segment *seg =first_seg (lv); +struct lv_segment *seg;uint32_t s;if (!_raid_add_images_without_commit (lv, new_count, pvs, use_existing_area_len))
lib/metadata/thin_manip.c +1 -1
@@ -472,7 +472,7 @@ static int _check_pool_create(const struct logical_volume *lv)int update_pool_lv (struct logical_volume *lv,int activate) { -int monitored =DMEVENTD_MONITOR_IGNORE ; +int monitored;int ret =1 ;if (!lv_is_thin_pool (lv)) {