X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_tail.c;h=0b31262d630d0a4ec14826e8f0094bf6be54531a;hb=5a223866595c0d7eb032c3c4fc3c7cd148e59f99;hp=5b7551d3a18f4925cb0403f454350373c8c7c6e8;hpb=a898c17330d9a2039bcdb8f7e6dbedba516a6cd8;p=collectd.git diff --git a/src/utils_tail.c b/src/utils_tail.c index 5b7551d3..0b31262d 100644 --- a/src/utils_tail.c +++ b/src/utils_tail.c @@ -239,6 +239,7 @@ int cu_tail_read (cu_tail_t *obj, char *buf, int buflen, tailfunc_t *callback, if (buf[len - 1] != '\n') break; buf[len - 1] = '\0'; + len--; } status = callback (data, buf, buflen);