]> code.delx.au - gnu-emacs/blobdiff - src/filelock.c
Merge from origin/emacs-24
[gnu-emacs] / src / filelock.c
index f857c48814359a7e070b013947fe16dc07db44ef..89d3e3502194c9951239822282c247f8b27a454c 100644 (file)
@@ -1,7 +1,7 @@
 /* Lock files for editing.
 
-Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2014
-  Free Software Foundation, Inc.
+Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2015 Free Software
+Foundation, Inc.
 
 Author: Richard King
   (according to authors.el)
@@ -209,8 +209,6 @@ get_boot_time (void)
                                            WTMP_FILE, counter);
          if (! NILP (Ffile_exists_p (tempname)))
            {
-             Lisp_Object args[6];
-
              /* The utmp functions on mescaline.gnu.org accept only
                 file names up to 8 characters long.  Choose a 2
                 character long prefix, and call make_temp_file with
@@ -219,13 +217,9 @@ get_boot_time (void)
              filename = Fexpand_file_name (build_string ("wt"),
                                            Vtemporary_file_directory);
              filename = make_temp_name (filename, 1);
-             args[0] = build_string ("gzip");
-             args[1] = Qnil;
-             args[2] = list2 (QCfile, filename);
-             args[3] = Qnil;
-             args[4] = build_string ("-cd");
-             args[5] = tempname;
-             Fcall_process (6, args);
+             CALLN (Fcall_process, build_string ("gzip"), Qnil,
+                    list2 (QCfile, filename), Qnil,
+                    build_string ("-cd"), tempname);
              delete_flag = 1;
            }
        }
@@ -592,9 +586,10 @@ current_lock_owner (lock_info_type *owner, char *lfname)
     return -1;
 
   /* On current host?  */
-  if (STRINGP (Vsystem_name)
-      && dot - (at + 1) == SBYTES (Vsystem_name)
-      && memcmp (at + 1, SSDATA (Vsystem_name), SBYTES (Vsystem_name)) == 0)
+  Lisp_Object system_name = Fsystem_name ();
+  if (STRINGP (system_name)
+      && dot - (at + 1) == SBYTES (system_name)
+      && memcmp (at + 1, SSDATA (system_name), SBYTES (system_name)) == 0)
     {
       if (pid == getpid ())
         ret = 2; /* We own it.  */