changeset 16816:9bdccdf9388b

(lock_info_type): Declare pid as unsigned long instead of int. (lock_file_1): Use %lu instead of %d in printf.
author Richard M. Stallman <rms@gnu.org>
date Thu, 02 Jan 1997 21:02:23 +0000
parents 9e0f59154164
children 40eaf36862f4
files src/filelock.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/filelock.c	Thu Jan 02 20:50:51 1997 +0000
+++ b/src/filelock.c	Thu Jan 02 21:02:23 1997 +0000
@@ -86,7 +86,7 @@
 {
   char *user;
   char *host;
-  int pid;
+  unsigned long pid;
 } lock_info_type;
 
 /* When we read the info back, we might need this much more.  */
@@ -136,7 +136,8 @@
   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)