mirror of
https://github.com/python/cpython.git
synced 2024-11-26 19:34:19 +08:00
open_the_file(): Explicitly set errno to 0 before calling fopen().
This commit is contained in:
parent
4279346a9f
commit
a27a150ea5
@ -106,6 +106,7 @@ open_the_file(PyFileObject *f, char *name, char *mode)
|
|||||||
"file() constructor not accessible in restricted mode");
|
"file() constructor not accessible in restricted mode");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
errno = 0;
|
||||||
#ifdef HAVE_FOPENRF
|
#ifdef HAVE_FOPENRF
|
||||||
if (*mode == '*') {
|
if (*mode == '*') {
|
||||||
FILE *fopenRF();
|
FILE *fopenRF();
|
||||||
|
Loading…
Reference in New Issue
Block a user