1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cov: add explicit check for external not being null

Although the code should never evaluate for null external
add explict check for analyzer.
This commit is contained in:
Zdenek Kabelac 2021-04-23 22:47:18 +02:00
parent d388b36da2
commit cdcd8011d0

View File

@ -341,8 +341,9 @@ static int _move_thins(struct volume_group *vg_from,
if ((_lv_is_in_vg(vg_to, data_lv) || if ((_lv_is_in_vg(vg_to, data_lv) ||
_lv_is_in_vg(vg_to, seg->external_lv))) { _lv_is_in_vg(vg_to, seg->external_lv))) {
if (_lv_is_in_vg(vg_from, seg->external_lv) || if (seg->external_lv &&
_lv_is_in_vg(vg_from, data_lv)) { (_lv_is_in_vg(vg_from, seg->external_lv) ||
_lv_is_in_vg(vg_from, data_lv))) {
log_error("Can't split external origin %s " log_error("Can't split external origin %s "
"and pool %s between two Volume Groups.", "and pool %s between two Volume Groups.",
display_lvname(seg->external_lv), display_lvname(seg->external_lv),