libcollectclient: snprintf already NUL-terminates
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 2 Jul 2017 19:50:48 +0000 (21:50 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 2 Jul 2017 19:50:48 +0000 (21:50 +0200)
src/libcollectdclient/client.c

index c3cd414..51a4ab2 100644 (file)
@@ -92,7 +92,6 @@
 #define LCC_SET_ERRSTR(c, ...)                                                 \
   do {                                                                         \
     snprintf((c)->errbuf, sizeof((c)->errbuf), __VA_ARGS__);                   \
-    (c)->errbuf[sizeof((c)->errbuf) - 1] = 0;                                  \
   } while (0)
 
 /*