Browse Source

rewind must clear the error indicator in addition to seeking

rs-1.0
Rich Felker 15 years ago
parent
commit
a6238c30d1
  1. 7
      src/stdio/rewind.c

7
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);
}

Loading…
Cancel
Save