summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/clearerr.c
blob: 0224446651780805e8adc7288478cf3aef5d06a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "__stdio.h" // for __FILE, _IO_EOF, _IO_ERR
#include "stddef.h"  // for NULL

#include <stdio.h> // for FILE, clearerr

void clearerr(FILE *stream)
{
	struct __FILE *stream_impl = __FILE(stream);

	if (stream == NULL)
		return;

	stream_impl->flags &= ~(_IO_ERR | _IO_EOF);
}