summaryrefslogtreecommitdiff
path: root/src/stdio/clearerr.c
blob: 44510744f228ea7d138cd7752b798956fce34623 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include "_stdio.h"

/** reset file stream error indicator **/

void clearerr(FILE * stream)
{
	flockfile(stream);
	if (stream != NULL) {
		stream->eof = 0;
		stream->err = 0;
	}
	funlockfile(stream);
}

/***
clears the error and end-of-file indicators of ARGUMENT(stream).
***/

/*
STDC(1)
*/