diff options
| author | Richard M. Stallman | 1997-01-02 21:02:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-01-02 21:02:23 +0000 |
| commit | 9005cb4f8f4d5d363a3e58435cb4725b4ee6b104 (patch) | |
| tree | 6ba3a2503cddf92325cc823e88c2e97f08ec66f6 /src | |
| parent | 5e7ed09384d53efe35568d6b62e4cc674134d06f (diff) | |
| download | emacs-9005cb4f8f4d5d363a3e58435cb4725b4ee6b104.tar.gz emacs-9005cb4f8f4d5d363a3e58435cb4725b4ee6b104.zip | |
(lock_info_type): Declare pid as unsigned long instead of int.
(lock_file_1): Use %lu instead of %d in printf.
Diffstat (limited to 'src')
| -rw-r--r-- | src/filelock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/filelock.c b/src/filelock.c index d30571a3598..25ab59eb25b 100644 --- a/src/filelock.c +++ b/src/filelock.c | |||
| @@ -86,7 +86,7 @@ typedef struct | |||
| 86 | { | 86 | { |
| 87 | char *user; | 87 | char *user; |
| 88 | char *host; | 88 | char *host; |
| 89 | int pid; | 89 | unsigned long pid; |
| 90 | } lock_info_type; | 90 | } lock_info_type; |
| 91 | 91 | ||
| 92 | /* When we read the info back, we might need this much more. */ | 92 | /* When we read the info back, we might need this much more. */ |
| @@ -136,7 +136,8 @@ lock_file_1 (lfname, force) | |||
| 136 | char *host_name = XSTRING (Fsystem_name ())->data; | 136 | char *host_name = XSTRING (Fsystem_name ())->data; |
| 137 | char *lock_info_str = alloca (strlen (user_name) + strlen (host_name) + 21); | 137 | char *lock_info_str = alloca (strlen (user_name) + strlen (host_name) + 21); |
| 138 | 138 | ||
| 139 | sprintf (lock_info_str, "%s@%s.%d", user_name, host_name, getpid ()); | 139 | sprintf (lock_info_str, "%s@%s.%lu", user_name, host_name, |
| 140 | (unsigned long) getpid ()); | ||
| 140 | 141 | ||
| 141 | err = symlink (lock_info_str, lfname); | 142 | err = symlink (lock_info_str, lfname); |
| 142 | if (errno == EEXIST && force) | 143 | if (errno == EEXIST && force) |