mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-23 06:32:05 +03:00
rewind must clear the error indicator in addition to seeking
This commit is contained in:
parent
71e6be641f
commit
a6238c30d1
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user