master - cov: remove unused assigns
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=70e3d0a613fb53e52f7a7cb31d65bcc2fa7ab738 Commit: 70e3d0a613fb53e52f7a7cb31d65bcc2fa7ab738 Parent: a91ac41b93eff0f3ebd3af3319e8bbcb1fe8d00f Author: Zdenek Kabelac <[email protected]> AuthorDate: Sat Nov 3 16:48:20 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Nov 5 17:25:11 2018 +0100
cov: remove unused assigns
--- lib/cache/lvmcache.c | 3 --- lib/device/dev-cache.c | 3 +-- lib/metadata/metadata.c | 6 ++---- libdm/dm-tools/dmfilemapd.c | 4 ++-- tools/pvscan.c | 3 +-- tools/vgchange.c | 2 +- 6 files changed, 7 insertions(+), 14 deletions(-)
lib/cache/lvmcache.c +0 -3
@@ -67,7 +67,6 @@ static DM_LIST_INIT(_vginfos);static DM_LIST_INIT (_found_duplicate_devs);static DM_LIST_INIT (_unused_duplicate_devs);static int _scanning_in_progress =0 ; -static int _has_scanned =0 ;static int _vgs_locked =0 ;static int _found_duplicate_pvs =0 ;/* If we never see a duplicate PV we can skip checking for them later. */
@@ -1808,8 +1807,6 @@ void lvmcache_destroy(struct cmd_context *cmd, int retain_orphans, int reset) {log_debug_cache ("Dropping VG info" ); - _has_scanned =0 ; -if (_vgid_hash) {dm_hash_destroy (_vgid_hash); _vgid_hash =NULL ;
lib/device/dev-cache.c +1 -2
@@ -666,10 +666,9 @@ struct dm_list *dev_cache_get_dev_list_for_lvid(const char *lvid)void dev_cache_failed_path (struct device *dev,const char *path) { -struct device *dev_by_path;struct dm_str_list *strl; -if ((dev_by_path = (struct device *)dm_hash_lookup (_cache.names, path))) +if (dm_hash_lookup (_cache.names, path))dm_hash_remove (_cache.names, path); dm_list_iterate_items(strl, &dev->aliases) {
lib/metadata/metadata.c +2 -4
@@ -1647,15 +1647,13 @@ struct generic_logical_volume *find_historical_glv(const struct volume_group *vgint lv_name_is_used_in_vg (const struct volume_group *vg,const char *name,int *historical) { -struct generic_logical_volume *historical_lv; -struct logical_volume *lv;int found =0 ; -if ((lv =find_lv (vg, name))) { +if (find_lv (vg, name)) { found =1 ;if (historical) *historical =0 ; - }else if ((historical_lv =find_historical_glv (vg, name,0 ,NULL ))) { + }else if (find_historical_glv (vg, name,0 ,NULL )) { found =1 ;if (historical) *historical =1 ;
libdm/dm-tools/dmfilemapd.c +2 -2
@@ -628,10 +628,10 @@ check_unlinked:static int _daemonise (struct filemap_monitor *fm) { -pid_t pid =0 , sid; +pid_t pid =0 ;int fd; -if (!(sid =setsid ())) { +if (!setsid ()) {_early_log ("setsid failed." );return 0 ; }
tools/pvscan.c +1 -2
@@ -452,7 +452,6 @@ static int _online_pvscan_one(struct cmd_context *cmd, struct device *dev,int disable_remove, const char **pvid_without_metadata) { - struct label *label; struct lvmcache_info *info;struct _pvscan_baton baton;const struct format_type *fmt;
@@ -474,7 +473,7 @@ static int _online_pvscan_one(struct cmd_context *cmd, struct device *dev,return 1 ; } -if (!(label =lvmcache_get_label (info))) { +if (!lvmcache_get_label (info)) {log_debug ("No PV label found for %s." ,dev_name (dev));if (!disable_remove)_online_pvid_file_remove_devno ((int )MAJOR (dev->dev), (int )MINOR (dev->dev));
tools/vgchange.c +1 -1
@@ -607,7 +607,7 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name, {int ret =ECMD_PROCESSED ;unsigned i; -activation_change_t activate =CHANGE_AN ; +activation_change_t activate; static const struct { int arg;