write_sensu: use sstrncpy
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 13 May 2018 15:06:54 +0000 (17:06 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 13 May 2018 15:06:54 +0000 (17:06 +0200)
commitb34cd94ec5b8b46fb0610c020c49f20e6d3980a8
treea6ec5070152dd1ea2ccf3d9358a41cd1861445e7
parent5627feac81780856c5d68cca40eb36cf2f25e96c
write_sensu: use sstrncpy

Fixes:
  CC       src/write_sensu.lo
src/write_sensu.c: In function ‘replace_str’:
src/write_sensu.c:630:3: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
   strncpy(r, p, strlen(p));
   ^~~~~~~~~~~~~~~~~~~~~~~~
  CCLD     write_sensu.la
src/write_sensu.c