diff options
| author | Tim Peters <tim.peters@gmail.com> | 2001-11-09 20:59:14 (GMT) |
|---|---|---|
| committer | Tim Peters <tim.peters@gmail.com> | 2001-11-09 20:59:14 (GMT) |
| commit | a27a150ea5f946d37e51a03e345115a227816698 (patch) | |
| tree | 85a2d5b6dbb1c51034fcb5b27c8d50db4abe8ae5 | |
| parent | 4279346a9f23a0108714349489b9c763bbbd4e89 (diff) | |
| download | cpython-a27a150ea5f946d37e51a03e345115a227816698.zip cpython-a27a150ea5f946d37e51a03e345115a227816698.tar.gz cpython-a27a150ea5f946d37e51a03e345115a227816698.tar.bz2 | |
open_the_file(): Explicitly set errno to 0 before calling fopen().
| -rw-r--r-- | Objects/fileobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index b4f9e9b..de1a93c 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -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(); |
