diff options
author | NeilBrown <neilb@suse.de> | 2010-08-05 05:13:02 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-08-05 05:13:02 +0200 |
commit | f21e18ca8969f21549c646096f354eac57cd53a8 (patch) | |
tree | 5e0b0474075ba8f629860964914fe18a6892ccd4 /config.c | |
parent | Detail: clean up handing of the 'info' we load from superblock. (diff) | |
download | mdadm-f21e18ca8969f21549c646096f354eac57cd53a8.tar.xz mdadm-f21e18ca8969f21549c646096f354eac57cd53a8.zip |
Compile with -Wextra by default
This produced lots of warning, some of which pointed to actual bugs.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -524,12 +524,13 @@ void arrayline(char *line) w); else { char *endptr; - mis.super_minor= strtol(w+12, &endptr, 10); - if (w[12]==0 || endptr[0]!=0 || mis.super_minor < 0) { + int minor = strtol(w+12, &endptr, 10); + + if (w[12]==0 || endptr[0]!=0 || minor < 0) fprintf(stderr, Name ": invalid super-minor number: %s\n", w); - mis.super_minor = UnSet; - } + else + mis.super_minor = minor; } } else if (strncasecmp(w, "name=", 5)==0) { if (mis.name[0]) |