Omit some unnecessary casts.
[bpt/emacs.git] / src / filelock.c
index 0f31b7d..df72eff 100644 (file)
@@ -181,7 +181,7 @@ get_boot_time (void)
      since utmp is typically much smaller than wtmp.
      Passing a null pointer causes get_boot_time_1
      to inspect the default file, namely utmp.  */
-  get_boot_time_1 ((char *) 0, 0);
+  get_boot_time_1 (0, 0);
   if (boot_time)
     return boot_time;
 
@@ -745,16 +745,15 @@ unlock_file (Lisp_Object fn)
 void
 unlock_all_files (void)
 {
-  register Lisp_Object tail;
+  register Lisp_Object tail, buf;
   register struct buffer *b;
 
-  for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail))
+  FOR_EACH_LIVE_BUFFER (tail, buf)
     {
-      b = XBUFFER (XCDR (XCAR (tail)));
-      if (STRINGP (BVAR (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
-       {
-         unlock_file (BVAR (b, file_truename));
-       }
+      b = XBUFFER (buf);
+      if (STRINGP (BVAR (b, file_truename))
+         && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
+       unlock_file (BVAR (b, file_truename));
     }
 }
 \f