From 4026cb6fd16149e59c2283306cc86b3b1b041691 Mon Sep 17 00:00:00 2001 From: Jonathan Earl Brassow Date: Mon, 19 Sep 2011 14:28:23 +0000 Subject: [PATCH] fix compiler warning. Compiler says variable may be used uninitialized. It can't be, but we initialize the variable to NULL anyway. Also, remove the double initialization of another variable. --- lib/metadata/mirror.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index cd182fea6..4d54b2077 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -584,7 +584,7 @@ static int _split_mirror_images(struct logical_volume *lv, struct logical_volume *detached_log_lv = NULL; struct lv_segment *mirrored_seg = first_seg(lv); struct dm_list split_images; - struct lv_list *lvl, *new_lvl; + struct lv_list *lvl, *new_lvl = NULL; struct cmd_context *cmd = lv->vg->cmd; if (!(lv->status & MIRRORED)) { @@ -748,7 +748,6 @@ there be something wrong in resume_lv? * - activate the new LV */ sync_local_dev_names(lv->vg->cmd); - new_lv = NULL; dm_list_iterate_items(lvl, &split_images) { if (!new_lv) { /* Grab 1st sub-LV for later */