diff options
author | NeilBrown <neilb@suse.de> | 2011-03-15 14:54:46 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-15 14:54:46 +1100 |
commit | e5cc7d469f09faa2f6666d61b7c719136e959d09 (patch) | |
tree | 0ffd0ae88da3f747122c82735f51693351854f77 | |
parent | 77632af90637004deac013d1716727b15094b3ee (diff) | |
download | mdadm-e5cc7d469f09faa2f6666d61b7c719136e959d09.tar.gz |
ddf: use correct loop variable in activate_spare
Using 'i' when you mean 'j' just shows how silly it is to use
variables named 'i' and 'j'.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | super-ddf.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/super-ddf.c b/super-ddf.c index 96d75ea..9013319 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -3619,13 +3619,14 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a, esize = ex[j].start - pos; if (esize >= a->info.component_size) break; - pos = ex[i].start + ex[i].size; - i++; - } while (ex[i-1].size); + pos = ex[j].start + ex[j].size; + j++; + } while (ex[j-1].size); free(ex); if (esize < a->info.component_size) { - dprintf("%x:%x has no room: %llu %llu\n", dl->major, dl->minor, + dprintf("%x:%x has no room: %llu %llu\n", + dl->major, dl->minor, esize, a->info.component_size); /* No room */ continue; |