projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71e6be6
)
rewind must clear the error indicator in addition to seeking
author
Rich Felker
<dalias@aerifal.cx>
Tue, 22 Feb 2011 22:11:35 +0000
(17:11 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 22 Feb 2011 22:11:35 +0000
(17:11 -0500)
src/stdio/rewind.c
patch
|
blob
|
history
diff --git
a/src/stdio/rewind.c
b/src/stdio/rewind.c
index 7944b434d8174ff32789ce4e00bd0bb4271a09f4..6f4b58b5468900cab60ca6e28c494ac2eea1c645 100644
(file)
--- a/
src/stdio/rewind.c
+++ b/
src/stdio/rewind.c
@@
-1,6
+1,9
@@
-#include
<stdio.h>
+#include
"stdio_impl.h"
void rewind(FILE *f)
{
- fseek(f, 0, SEEK_SET);
+ FLOCK(f);
+ __fseeko_unlocked(f, 0, SEEK_SET);
+ f->flags &= ~F_ERR;
+ FUNLOCK(f);
}