]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Fix return code for --detail-platform
authorMaciej Naruszewicz <maciej.naruszewicz@intel.com>
Tue, 2 Oct 2012 06:37:48 +0000 (16:37 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 2 Oct 2012 06:37:48 +0000 (16:37 +1000)
Variable 'err' is initially set to 1, so changing its value with
'|=' won't set it to 0 even if the operation is successful.

Signed-off-by: Maciej Naruszewicz <maciej.naruszewicz@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Detail.c

index db38916b9910dd97977e82a2850c500c0a6d723c..f3a1e3e16993c72c5df0671c3c67938e29d95d27 100644 (file)
--- a/Detail.c
+++ b/Detail.c
@@ -640,6 +640,7 @@ int Detail_Platform(struct superswitch *ss, int scan, int verbose, int export)
        if (!scan)
                return err;
 
+       err = 0;
        for (i = 0; superlist[i]; i++) {
                struct superswitch *meta = superlist[i];