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 5b7551d..0b31262 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);