summaryrefslogtreecommitdiffstats
path: root/dotlock.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2019-12-18 14:10:38 -0800
committerKevin McCarthy <kevin@8t8.us>2019-12-18 14:10:38 -0800
commit7aed228a7eeb2d74f431fa7b6951312aee8d7eed (patch)
treeba04aebc5b2c033c7cff4fe9ce794e2ac892c500 /dotlock.c
parent60dd8986b65297e8cd5ceacd0f24b72eb9e6f9b8 (diff)
Revert "Fixes unchecked return from link() in dotlock.c"
Diffstat (limited to 'dotlock.c')
-rw-r--r--dotlock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/dotlock.c b/dotlock.c
index 78eb0c0b..aa2c2b43 100644
--- a/dotlock.c
+++ b/dotlock.c
@@ -595,7 +595,6 @@ dotlock_lock (const char *realpath)
int hard_count = 0;
struct stat sb;
time_t t;
- int rc;
snprintf (nfslockfile, sizeof (nfslockfile), "%s.%s.%d",
realpath, Hostname, (int) getpid ());
@@ -630,10 +629,10 @@ dotlock_lock (const char *realpath)
{
BEGIN_PRIVILEGED ();
- rc = link (nfslockfile, lockfile);
+ link (nfslockfile, lockfile);
END_PRIVILEGED ();
- if (rc != 0 || stat (nfslockfile, &sb) != 0)
+ if (stat (nfslockfile, &sb) != 0)
{
/* perror ("stat"); */
return DL_EX_ERROR;