mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-30 05:49:28 +03:00
cleanup: do not call vg_read with NULL mda
Use 'mda' instead of NULL to quite Coverity warn. However this code seems to be actually not even possible to hit. With proper analysis it may possibly be dropped from code to simplify logic.
This commit is contained in:
3
lib/cache/lvmetad.c
vendored
3
lib/cache/lvmetad.c
vendored
@ -1370,9 +1370,10 @@ int lvmetad_pvscan_single(struct cmd_context *cmd, struct device *dev,
|
||||
* can scan further devices.
|
||||
*/
|
||||
if (!baton.vg && !(baton.fid->fmt->features & FMT_MDAS)) {
|
||||
/* This code seems to be unreachable */
|
||||
if ((mda = (struct metadata_area *)dm_list_first(&baton.fid->metadata_areas_in_use)))
|
||||
baton.vg = mda->ops->vg_read(baton.fid, lvmcache_vgname_from_info(info),
|
||||
NULL, NULL, NULL, 1);
|
||||
mda, NULL, NULL, 1);
|
||||
}
|
||||
|
||||
if (!baton.vg)
|
||||
|
Reference in New Issue
Block a user