Fixed error in clearerr
authorceriel <none@none>
Thu, 3 Jan 1991 16:08:31 +0000 (16:08 +0000)
committerceriel <none@none>
Thu, 3 Jan 1991 16:08:31 +0000 (16:08 +0000)
lang/cem/libcc.ansi/headers/stdio.h

index 009290f..46251db 100644 (file)
@@ -124,7 +124,7 @@ int __flushbuf(int _c, FILE *_stream);
 
 #define        feof(p)         (((p)->_flags & _IOEOF) != 0)
 #define        ferror(p)       (((p)->_flags & _IOERR) != 0)
-#define clearerr(p)    ((p)->_flags &= (_IOERR|_IOEOF))
+#define clearerr(p)    ((p)->_flags &= ~(_IOERR|_IOEOF))
 
 #if    defined(__BSD4_2) || defined(__USG) || defined(_POSIX_SOURCE)
 int fileno(FILE *_stream);