open_the_file(): Explicitly set errno to 0 before calling fopen().

This commit is contained in:
Tim Peters 2001-11-09 20:59:14 +00:00
parent 4279346a9f
commit a27a150ea5

View File

@ -106,6 +106,7 @@ open_the_file(PyFileObject *f, char *name, char *mode)
"file() constructor not accessible in restricted mode");
return NULL;
}
errno = 0;
#ifdef HAVE_FOPENRF
if (*mode == '*') {
FILE *fopenRF();