X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_tail.c;h=904a52122e7e40d4d6ebcc47788d218fe99888fa;hb=800f5a2a254c8be8219d92de08debc3cf0a7bd1b;hp=eaf8f738d71e163d628fdfca13f0f32c3678c3a1;hpb=b8cf3eff3c9f88615a55b7f4d606912a4a533e71;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;