From e01bcc6884be9a31bcccdec07ee348a8d40ae54e Mon Sep 17 00:00:00 2001 From: Jonathan Earl Brassow Date: Wed, 10 Aug 2011 16:44:17 +0000 Subject: [PATCH] Fix compiler warning. Compiler complaining that meta_lv could be used uninitialized. (Not true because it is protected by 'clear_metadata'.) I switched to using 'lv->vg', as it makes no difference to vg_[write|commit]. --- lib/metadata/lv_manip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index e540c8256..6e50bad46 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -2389,7 +2389,7 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah, /* * We must clear the metadata areas upon creation. */ - if (!vg_write(meta_lv->vg) || !vg_commit(meta_lv->vg)) + if (!vg_write(lv->vg) || !vg_commit(lv->vg)) return_0; for (s = 0; s < seg->area_count; s++) {