summaryrefslogtreecommitdiffstats
path: root/mdstat.c
diff options
context:
space:
mode:
authorZhilong Liu <zlliu@suse.com>2017-10-09 10:21:14 +0200
committerJes Sorensen <jsorensen@fb.com>2017-10-10 22:38:02 +0200
commit35c34037b55aaa36bdda5b1f01e69a1c84c8f408 (patch)
treeab59e5860f5ed4b03f26cc9da774fe3d13ad66eb /mdstat.c
parentmdadm/mdstat: fixup a number of '==' broken formatting (diff)
downloadmdadm-35c34037b55aaa36bdda5b1f01e69a1c84c8f408.tar.xz
mdadm-35c34037b55aaa36bdda5b1f01e69a1c84c8f408.zip
mdadm/mdstat: correct the strncmp number 4 as 6
mdstat: it should be corrected as 6 when strncmp 'resync'. Signed-off-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdstat.c')
-rw-r--r--mdstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdstat.c b/mdstat.c
index 6c906a7e..7e600d0c 100644
--- a/mdstat.c
+++ b/mdstat.c
@@ -244,7 +244,7 @@ struct mdstat_ent *mdstat_read(int hold, int start)
ent->resync = 0;
} else if (ent->percent == RESYNC_NONE &&
(w[0] == 'r' || w[0] == 'c')) {
- if (strncmp(w, "resync", 4) == 0)
+ if (strncmp(w, "resync", 6) == 0)
ent->resync = 1;
if (strncmp(w, "reshape", 7) == 0)
ent->resync = 2;