1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

cov: remove unused assigns

This commit is contained in:
Zdenek Kabelac 2018-11-03 16:48:20 +01:00 committed by David Teigland
parent 180941274d
commit af08412fd9
6 changed files with 7 additions and 14 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -1647,15 +1647,13 @@ struct generic_logical_volume *find_historical_glv(const struct volume_group *vg
int 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;

View File

@ -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;
}

View File

@ -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));

View File

@ -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;