projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78217ea
)
src/utils_tail.c: Call `clearerr' before `fgets'.
author
Florian Forster
<octo@huhu.verplant.org>
Fri, 10 Oct 2008 10:40:38 +0000
(12:40 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Fri, 10 Oct 2008 10:40:38 +0000
(12:40 +0200)
Hopefully this will resolve problems under the dietlibc.
src/utils_tail.c
patch
|
blob
|
history
diff --git
a/src/utils_tail.c
b/src/utils_tail.c
index
eaf8f73
..
904a521
100644
(file)
--- 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;