summaryrefslogtreecommitdiff
path: root/src/stdio/clearerr.c
blob: 9b817a97c273107830c9ab0845874427b38f1b5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include "nonstd/io.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)
*/