From: Kim F. Storm Date: Wed, 20 Jul 2005 14:40:35 +0000 (+0000) Subject: (load_unwind): Rework last change. X-Git-Tag: emacs-pretest-22.0.90~7962 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ebfe97a2d40fa1726e429fd76750d910ade3e871;p=emacs.git (load_unwind): Rework last change. --- diff --git a/src/lread.c b/src/lread.c index cb455ebbb00..2a9a8c060cc 100644 --- a/src/lread.c +++ b/src/lread.c @@ -953,12 +953,12 @@ Return t if file exists. */) } static Lisp_Object -load_unwind (stream) /* used as unwind-protect function in load */ - Lisp_Object stream; +load_unwind (arg) /* used as unwind-protect function in load */ + Lisp_Object arg; { - struct Lisp_Save_Value *p = XSAVE_VALUE (stream); - - fclose ((FILE *) p->pointer); + FILE *stream = (FILE *) XSAVE_VALUE (arg)->pointer; + if (stream != NULL) + fclose (stream); if (--load_in_progress < 0) load_in_progress = 0; return Qnil; }