]> git.eshelyaron.com Git - emacs.git/commitdiff
(load_unwind): Rework last change.
authorKim F. Storm <storm@cua.dk>
Wed, 20 Jul 2005 14:40:35 +0000 (14:40 +0000)
committerKim F. Storm <storm@cua.dk>
Wed, 20 Jul 2005 14:40:35 +0000 (14:40 +0000)
src/lread.c

index cb455ebbb002d8d1ea5f23b199a9b5bde09c5fdb..2a9a8c060ccd3b7c1aec8e8d3052340761451a5c 100644 (file)
@@ -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;
 }