Code

src/utils_tail.c: Remove multiple newlines at EOL.
authorFlorian Forster <octo@collectd.org>
Tue, 29 Jan 2013 10:04:36 +0000 (11:04 +0100)
committerFlorian Forster <octo@collectd.org>
Tue, 29 Jan 2013 10:04:36 +0000 (11:04 +0100)
src/utils_tail.c

index 5b7551d3a18f4925cb0403f454350373c8c7c6e8..0b31262d630d0a4ec14826e8f0094bf6be54531a 100644 (file)
@@ -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);