]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: ddf_activate_spare: fix gcc -O2 uninitialized warning
authorNeilBrown <neilb@suse.de>
Fri, 16 Aug 2013 18:21:55 +0000 (20:21 +0200)
committerNeilBrown <neilb@suse.de>
Wed, 28 Aug 2013 04:41:26 +0000 (14:41 +1000)
At this point 'di' and 'rv' both have the same value.  gcc doesn't
realise that and a human reader might not either.
'rv' makes more sense too, so use that.

Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index e3b3dcaa11ecc78c94d226b4f316fd12de0aa85b..ee6499a338f22bc3a22855367fc631cfff269329 100644 (file)
@@ -4959,7 +4959,7 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a,
         * Create a metadata_update record to update the
         * phys_refnum and lba_offset values
         */
-       vc = find_vdcr(ddf, a->info.container_member, di->disk.raid_disk,
+       vc = find_vdcr(ddf, a->info.container_member, rv->disk.raid_disk,
                       &n_bvd, &vcl);
        if (vc == NULL)
                return NULL;