X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_tail.c;h=904a52122e7e40d4d6ebcc47788d218fe99888fa;hb=7658e9919a3ac9efafe4c7c2c76112ec67eeee3b;hp=eaf8f738d71e163d628fdfca13f0f32c3678c3a1;hpb=6acb19befc321c501e4d8b79f403ebda0c021acc;p=collectd.git diff --git a/src/utils_tail.c b/src/utils_tail.c index eaf8f738..904a5212 100644 --- a/src/utils_tail.c +++ b/src/utils_tail.c @@ -162,6 +162,7 @@ int cu_tail_readline (cu_tail_t *obj, char *buf, int buflen) /* Try to read from the filehandle. If that succeeds, everything appears to * be fine and we can return. */ + clearerr (obj->fh); if (fgets (buf, buflen, obj->fh) != NULL) { buf[buflen - 1] = 0;