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

get lv_list properly from vg->lst and fix compiler warning

This commit is contained in:
Zdenek Kabelac 2008-08-13 13:42:35 +00:00
parent 8df4c3748a
commit 38a8b563bf

View File

@ -296,11 +296,14 @@ static int remove_lvs_in_vg(struct cmd_context *cmd,
struct volume_group *vg,
force_t force)
{
struct list *lst;
struct lv_list *lvl;
while ((lvl = list_first(&vg->lvs)))
while ((lst = list_first(&vg->lvs))) {
lvl = list_item(lst, struct lv_list);
if (!lv_remove_with_dependencies(cmd, lvl->lv, force))
return 0;
return 0;
}
return 1;
}