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>
This commit is contained in:
Jes Sorensen 2018-05-31 11:45:21 -04:00
parent 5a5b3a6725
commit 9758983959
1 changed files with 1 additions and 1 deletions

View File

@ -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)
*/