summaryrefslogtreecommitdiffstats
path: root/mdopen.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2016-10-07 05:55:20 +0200
committerJes Sorensen <Jes.Sorensen@redhat.com>2016-10-07 17:47:48 +0200
commit681b7ae245db80b24d45abdc3f5040c796aa29cc (patch)
tree5d6187f9ed6b2eec1d2cfdae26a9a6fb7639b455 /mdopen.c
parentimsm: retrieve nvme serial from sysfs (diff)
downloadmdadm-681b7ae245db80b24d45abdc3f5040c796aa29cc.tar.xz
mdadm-681b7ae245db80b24d45abdc3f5040c796aa29cc.zip
Fix some issues found by clang
The clang compiler complained about each of these. The mdmon.h error will only affect 'far' RAID10 arrays using intel or DDF metadata, and there is no such thing. The mdopen.c will cause a problem if there are no free md device numbers in the first 512. That is fairly unlikely. The restripe.c error would only affect the 'test_stripe' command, and probably doesn't change its behaviour. The super-intel.c fix is purely cosmetic. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'mdopen.c')
-rw-r--r--mdopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdopen.c b/mdopen.c
index 5af344b9..0ea38749 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -318,7 +318,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy,
else if (num < 0) {
/* need to choose a free number. */
char *_devnm = find_free_devnm(use_mdp);
- if (devnm == NULL) {
+ if (_devnm == NULL) {
pr_err("No avail md devices - aborting\n");
return -1;
}