mdadm: check value returned by snprintf against errors
authorKrzysztof Smolinski <krzysztof.smolinski@intel.com>
Fri, 16 Aug 2019 09:06:17 +0000 (11:06 +0200)
committerJes Sorensen <jsorensen@fb.com>
Fri, 16 Aug 2019 14:06:50 +0000 (10:06 -0400)
commitfd5b09c9a9107f0393ce194c4aac6e7b8f163e85
tree668acaccc0b9c13398027db5a2c68a8b3e57ae99
parent91c97c5432028875db5f8abeddb5cb5f31902001
mdadm: check value returned by snprintf against errors

GCC 8 checks possible truncation during snprintf more strictly
than GCC 7 which result in compilation errors. To fix this
problem checking result of snprintf against errors has been added.

Signed-off-by: Krzysztof Smolinski <krzysztof.smolinski@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
sysfs.c