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:
parent
bfcf3edcc6
commit
c6cfd7b2b9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user