main: remove use of uninitialized 'rv'.

If c.homecluster was not NULL, might get an
error anyway.

Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
NeilBrown 2015-08-05 14:53:33 +10:00
parent 598f8904ac
commit 380487fdc9
1 changed files with 2 additions and 2 deletions

View File

@ -1293,11 +1293,12 @@ int main(int argc, char *argv[])
c.require_homehost = 0;
}
rv = 0;
if (c.homecluster == NULL && (c.nodes > 0)) {
c.homecluster = conf_get_homecluster();
if (c.homecluster == NULL)
rv = get_cluster_name(&c.homecluster);
if (rv != 0) {
if (rv) {
pr_err("The md can't get cluster name\n");
exit(1);
}
@ -1322,7 +1323,6 @@ int main(int argc, char *argv[])
/* --scan implied --brief unless -vv */
c.brief = 1;
rv = 0;
switch(mode) {
case MANAGE:
/* readonly, add/remove, readwrite, runstop */