]> sourceware.org Git - lvm2.git/commitdiff
cleanup: older gcc is not smart enough
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 11 Jul 2014 11:47:50 +0000 (13:47 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 11 Jul 2014 11:52:30 +0000 (13:52 +0200)
Avoid gcc warning about uninitialized 'seg' variable.
It's not easy for older gcc compiler to deduce it's been set.

tools/lvconvert.c

index ff32f76406e84369ec165ae14d472e8589932050..3a5f1295bb1cc57884865a509ab6a6bacfbccd1f 100644 (file)
@@ -2958,7 +2958,7 @@ static int _lvconvert_pool(struct cmd_context *cmd,
                /* Swap normal LV with pool's metadata LV ? */
                if (lv_is_pool(pool_lv)) {
                        /* Swap names between old and new metadata LV */
-                       if (!detach_pool_metadata_lv(seg, &pool_metadata_lv))
+                       if (!detach_pool_metadata_lv(first_seg(pool_lv), &pool_metadata_lv))
                                return_0;
                        old_name = metadata_lv->name;
                        if (!lv_rename_update(cmd, metadata_lv, "pvmove_tmeta", 0))
This page took 0.044382 seconds and 5 git commands to generate.