From: NeilBrown Date: Fri, 16 Aug 2013 18:21:55 +0000 (+0200) Subject: DDF: ddf_activate_spare: fix gcc -O2 uninitialized warning X-Git-Tag: mdadm-3.3~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb925ff08beda785d42f5ff8a0f082d91c5caad4;p=thirdparty%2Fmdadm.git DDF: ddf_activate_spare: fix gcc -O2 uninitialized warning 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 Signed-off-by: NeilBrown --- diff --git a/super-ddf.c b/super-ddf.c index e3b3dcaa..ee6499a3 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -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;