Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Staging:C
mdadm
0002-main-remove-use-of-uninitialized-rv.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-main-remove-use-of-uninitialized-rv.patch of Package mdadm
From 380487fdc9773fc93d2cb4f17560a067f87107ac Mon Sep 17 00:00:00 2001 From: NeilBrown <neilb@suse.com> Date: Wed, 5 Aug 2015 14:53:33 +1000 Subject: [PATCH] main: remove use of uninitialized 'rv'. If c.homecluster was not NULL, might get an error anyway. Signed-off-by: NeilBrown <neilb@suse.com> --- mdadm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mdadm.c +++ b/mdadm.c @@ -1326,11 +1326,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); } @@ -1355,7 +1356,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 */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor