From 7aed228a7eeb2d74f431fa7b6951312aee8d7eed Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Wed, 18 Dec 2019 14:10:38 -0800 Subject: [PATCH] Revert "Fixes unchecked return from link() in dotlock.c" This reverts commit 317b7f6b53d8a4272acf8ef1b56f3406e9bc2691. --- dotlock.c | 5 ++--- 1 file 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; -- 2.30.1