X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_tail.c;h=0b31262d630d0a4ec14826e8f0094bf6be54531a;hb=0beeec00eeeabf9f1ff30d55d7b8c4032f6f24b7;hp=5b7551d3a18f4925cb0403f454350373c8c7c6e8;hpb=efa4700ad47969749b0fca622294fd006b2d7cb8;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);