diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-17 13:23:28 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-11-17 19:01:25 +0100 |
commit | 011dd82050fb3225d7ea3c24be5c8dad026117d3 (patch) | |
tree | 258b823e243948f8809d8304b63b737a56074ad5 | |
parent | 121341e52c8cb3bf14571cad0c3d90c1ec9d717d (diff) | |
download | lvm2-011dd82050fb3225d7ea3c24be5c8dad026117d3.tar.gz |
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.
-rw-r--r-- | lib/cache/lvmetad.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c index 8b5bcfb09..d300d3920 100644 --- a/lib/cache/lvmetad.c +++ b/lib/cache/lvmetad.c @@ -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) |