1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +03:00

cleanup: drop extra dm_list_empty

Since dm_list_first has this check already include,
skip extra call in while().
Moreover analyzers are then sure pvl is not NULL.
This commit is contained in:
Zdenek Kabelac 2013-11-24 19:03:29 +01:00
parent bfcf3edcc6
commit c6cfd7b2b9

View File

@ -2798,8 +2798,7 @@ static struct volume_group *_vg_read_orphans(struct cmd_context *cmd,
baton.warnings = warnings;
baton.vg = vg;
while (!dm_list_empty(&head.list)) {
pvl = (struct pv_list *) dm_list_first(&head.list);
while ((pvl = (struct pv_list *) dm_list_first(&head.list))) {
dm_list_del(&pvl->list);
add_pvl_to_vgs(vg, pvl);
vg->extent_count += pvl->pv->pe_count;