From a27a150ea5f946d37e51a03e345115a227816698 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Fri, 9 Nov 2001 20:59:14 +0000 Subject: open_the_file(): Explicitly set errno to 0 before calling fopen(). --- Objects/fileobject.c | 1 + 1 file changed, 1 insertion(+) 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(); -- cgit v0.12