From: Zhilong Liu Date: Mon, 9 Oct 2017 08:21:14 +0000 (+0800) Subject: mdadm/mdstat: correct the strncmp number 4 as 6 X-Git-Tag: mdadm-4.1-rc1~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35c34037b55aaa36bdda5b1f01e69a1c84c8f408;p=thirdparty%2Fmdadm.git mdadm/mdstat: correct the strncmp number 4 as 6 mdstat: it should be corrected as 6 when strncmp 'resync'. Signed-off-by: Zhilong Liu Signed-off-by: Jes Sorensen --- 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;