aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-08-14 07:21:00 +0000
committerRichard M. Stallman1993-08-14 07:21:00 +0000
commit4601350064e3ff852f1b7a179feeab066df59768 (patch)
treef194b4bd1b40481fe3b6b20dd0f6dabfb0882743 /src
parent11378c410a4f99ac0ddf76704e5f862f35aeb135 (diff)
downloademacs-4601350064e3ff852f1b7a179feeab066df59768.tar.gz
emacs-4601350064e3ff852f1b7a179feeab066df59768.zip
(getpwuid): Declare it as in xrdb.c.
(init_filelock): Don't use return value of strcpy.
Diffstat (limited to 'src')
-rw-r--r--src/filelock.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/filelock.c b/src/filelock.c
index 787fcc3ce66..73f6f4237e6 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -42,7 +42,9 @@ extern int errno;
42extern char *egetenv (); 42extern char *egetenv ();
43extern char *strcpy (); 43extern char *strcpy ();
44 44
45#ifndef __386bsd__ 45#if defined (__bsdi__) || defined (DECLARE_GETPWUID_WITH_UID_T)
46extern struct passwd *getpwuid (uid_t);
47#else
46extern struct passwd *getpwuid (); 48extern struct passwd *getpwuid ();
47#endif 49#endif
48 50
@@ -437,8 +439,9 @@ init_filelock ()
437 /* Make sure it ends with a slash. */ 439 /* Make sure it ends with a slash. */
438 if (lock_path[strlen (lock_path) - 1] != '/') 440 if (lock_path[strlen (lock_path) - 1] != '/')
439 { 441 {
440 lock_path = strcpy ((char *) xmalloc (strlen (lock_path) + 2), 442 char *new_path = (char *) xmalloc (strlen (lock_path) + 2);
441 lock_path); 443 strcpy (new_path, lock_path);
444 lock_path = new_path;
442 strcat (lock_path, "/"); 445 strcat (lock_path, "/");
443 } 446 }
444 447