1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: format1 test whether PV was found

Avoid dereferecing NULL pointer.
This commit is contained in:
Zdenek Kabelac 2012-06-21 13:52:19 +02:00
parent 132306c888
commit 243cd3fd2c

View File

@ -118,7 +118,10 @@ static int _fill_maps(struct dm_hash_table *maps, struct volume_group *vg,
uint32_t i, lv_num, le;
dm_list_iterate_items(dl, pvds) {
pv = find_pv(vg, dl->dev);
if (!(pv = find_pv(vg, dl->dev))) {
log_error("PV %s not found.", dl->dev->pvid);
return 0;
}
e = dl->extents;
/* build an array of lv's for this pv */