1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-31 05:47:43 +03:00

lv: fix check for NULL origin_lv in _do_lv_origin_dup, cleanup _do_lvconvert_lv_dup

This commit is contained in:
Peter Rajnoha 2016-01-13 17:11:00 +01:00
parent 04d1a8a5e4
commit 63d59254d9

View File

@ -273,7 +273,7 @@ static char *_do_lv_origin_dup(struct dm_pool *mem, const struct logical_volume
{
struct logical_volume *origin_lv = lv_origin_lv(lv);
if (!lv)
if (!origin_lv)
return NULL;
if (uuid)
@ -533,14 +533,13 @@ static char *_do_lv_convert_lv_dup(struct dm_pool *mem, const struct logical_vol
{
struct logical_volume *convert_lv = lv_convert_lv(lv);
if (convert_lv) {
if (uuid)
return lv_uuid_dup(mem, convert_lv);
else
return lv_name_dup(mem, convert_lv);
}
if (!convert_lv)
return NULL;
return NULL;
if (uuid)
return lv_uuid_dup(mem, convert_lv);
else
return lv_name_dup(mem, convert_lv);
}
char *lv_convert_lv_dup(struct dm_pool *mem, const struct logical_volume *lv)