summaryrefslogtreecommitdiffstats
path: root/Monitor.c
diff options
context:
space:
mode:
authorJes Sorensen <jsorensen@fb.com>2018-05-31 17:45:21 +0200
committerJes Sorensen <jsorensen@fb.com>2018-05-31 17:45:21 +0200
commit975898395951835f5a8051441af21cc995921f8c (patch)
tree04bc91cd5b85448089df1fc0b270fd943f33fb02 /Monitor.c
parentimsm: Do not require MDADM_EXPERIMENTAL flag anymore (diff)
downloadmdadm-975898395951835f5a8051441af21cc995921f8c.tar.xz
mdadm-975898395951835f5a8051441af21cc995921f8c.zip
Monitor: Increase size of percentalert to avoid gcc warning
gcc-8.1 complains about truncated string operations. While we know percent will never grow larger than 100, it doesn't cost us anything to increase the size of 'percentalert' on the stack like this. Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to '')
-rw-r--r--Monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Monitor.c b/Monitor.c
index c7c05d27..036103fb 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -557,7 +557,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
alert("RebuildStarted", dev, NULL, ainfo);
if (st->percent >= 0 && mse->percent >= 0 &&
(mse->percent / increments) > (st->percent / increments)) {
- char percentalert[15];
+ char percentalert[18];
/*
* "RebuildNN" (10 chars) or "RebuildStarted" (15 chars)
*/