comparison src/filelock.c @ 18707:23039b06955a

(current_lock_owner, lock_file_1): Add casts.
author Richard M. Stallman <rms@gnu.org>
date Thu, 10 Jul 1997 03:03:10 +0000
parents f36d8f965ab5
children f2c1ffb0778a
comparison
equal deleted inserted replaced
18706:4af0aa969bbe 18707:23039b06955a
131 lock_file_1 (lfname, force) 131 lock_file_1 (lfname, force)
132 char *lfname; 132 char *lfname;
133 int force; 133 int force;
134 { 134 {
135 register int err; 135 register int err;
136 char *user_name = XSTRING (Fuser_login_name (Qnil))->data; 136 char *user_name = (char *) XSTRING (Fuser_login_name (Qnil))->data;
137 char *host_name = XSTRING (Fsystem_name ())->data; 137 char *host_name = (char *) XSTRING (Fsystem_name ())->data;
138 char *lock_info_str = alloca (strlen (user_name) + strlen (host_name) 138 char *lock_info_str = alloca (strlen (user_name) + strlen (host_name)
139 + LOCK_PID_MAX + 5); 139 + LOCK_PID_MAX + 5);
140 140
141 sprintf (lock_info_str, "%s@%s.%lu", user_name, host_name, 141 sprintf (lock_info_str, "%s@%s.%lu", user_name, host_name,
142 (unsigned long) getpid ()); 142 (unsigned long) getpid ());
193 193
194 /* Even if the caller doesn't want the owner info, we still have to 194 /* Even if the caller doesn't want the owner info, we still have to
195 read it to determine return value, so allocate it. */ 195 read it to determine return value, so allocate it. */
196 if (!owner) 196 if (!owner)
197 { 197 {
198 owner = alloca (sizeof (lock_info_type)); 198 owner = (lock_info_type *) alloca (sizeof (lock_info_type));
199 local_owner = 1; 199 local_owner = 1;
200 } 200 }
201 201
202 /* Parse USER@HOST.PID. If can't parse, return -1. */ 202 /* Parse USER@HOST.PID. If can't parse, return -1. */
203 /* The USER is everything before the first @. */ 203 /* The USER is everything before the first @. */