commit 57dcbea1736e66f1a61d2fd7c0c3904a259e6f0e
parent 929e3f4dd381bbd8e885e778696763105e682f3a
Author: Jaromil <jaromil@dyne.org>
Date: Fri, 26 Dec 2014 12:20:44 +0100
removed dotlock compilation warning
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/dotlock.c b/src/dotlock.c
@@ -597,7 +597,8 @@ dotlock_lock (const char *realpath)
int hard_count = 0;
struct stat sb;
time_t t;
-
+ int i;
+
snprintf (nfslockfile, sizeof (nfslockfile), "%s.%s.%d",
realpath, Hostname, (int) getpid ());
snprintf (lockfile, sizeof (lockfile), "%s.lock", realpath);
@@ -631,7 +632,7 @@ dotlock_lock (const char *realpath)
{
BEGIN_PRIVILEGED ();
- link (nfslockfile, lockfile);
+ i = link (nfslockfile, lockfile);
END_PRIVILEGED ();
if (stat (nfslockfile, &sb) != 0)