1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

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.
This commit is contained in:
Jonathan Earl Brassow 2011-09-19 14:28:23 +00:00
parent 967f2d4510
commit 4026cb6fd1

View File

@ -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 */