FAT | RFS | XFS | ZFS

clearerr()

PROTOTYPE

#include <stdio.h>

void clearerr(FILE *file);

DESCRIPTION

clearerr() is used to clear the error and end-of-file indicators for the open file identified by file, which is a file handle returned by fopen() or other API routine.

ERROR CODES

EBADF file is not the handle of an open file.

EXAMPLE

/*---------------------------------------------------------------*/
/* Clear the error for stream.                                   */
/*---------------------------------------------------------------*/
clearerr(file);