From: Tim Peters Date: Fri, 9 Nov 2001 20:59:14 +0000 (+0000) Subject: open_the_file(): Explicitly set errno to 0 before calling fopen(). X-Git-Tag: v2.2.1c1~802 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a27a150ea5f946d37e51a03e345115a227816698;p=thirdparty%2FPython%2Fcpython.git open_the_file(): Explicitly set errno to 0 before calling fopen(). --- diff --git a/Objects/fileobject.c b/Objects/fileobject.c index b4f9e9b5c68e..de1a93c44e27 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();