Grow: Do not shadow an existing variable

Declaring 'int rv' twice within the same function is asking for
trouble.

Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
This commit is contained in:
Jes Sorensen 2017-03-30 10:46:01 -04:00
parent 758b327cf5
commit 49948a3561
1 changed files with 3 additions and 3 deletions

6
Grow.c
View File

@ -1834,7 +1834,7 @@ int Grow_reshape(char *devname, int fd,
* pre-requisite spare devices (mdmon owns final validation)
*/
if (st->ss->external) {
int rv;
int retval;
if (subarray) {
container = st->container_devnm;
@ -1852,9 +1852,9 @@ int Grow_reshape(char *devname, int fd,
return 1;
}
rv = st->ss->load_container(st, cfd, NULL);
retval = st->ss->load_container(st, cfd, NULL);
if (rv) {
if (retval) {
pr_err("Cannot read superblock for %s\n",
devname);
free(subarray);