Commits

Anonymous committed 9bdccdf

(lock_info_type): Declare pid as unsigned long instead of int.
(lock_file_1): Use %lu instead of %d in printf.

  • Participants
  • Parent commits 9e0f591

Comments (0)

Files changed (1)

File src/filelock.c

 {
   char *user;
   char *host;
-  int pid;
+  unsigned long pid;
 } lock_info_type;
 
 /* When we read the info back, we might need this much more.  */
   char *host_name = XSTRING (Fsystem_name ())->data;
   char *lock_info_str = alloca (strlen (user_name) + strlen (host_name) + 21);
 
-  sprintf (lock_info_str, "%s@%s.%d", user_name, host_name, getpid ());
+  sprintf (lock_info_str, "%s@%s.%lu", user_name, host_name,
+           (unsigned long) getpid ());
 
   err = symlink (lock_info_str, lfname);
   if (errno == EEXIST && force)