aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/pathlocks.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-01-25 12:51:35 +0100
committerEelco Dolstra <edolstra@gmail.com>2017-01-26 20:40:33 +0100
commita55f589720e6499ed8ca1e3dd63ae18c52782150 (patch)
tree9bcc366d7ea1030a38d248e44efd5fb99bd8408d /src/libstore/pathlocks.cc
parentc0f2f4eeeffd9c62ee2c59b42e6824d297d210f1 (diff)
openLockFile: Return an AutoCloseFD
Diffstat (limited to 'src/libstore/pathlocks.cc')
-rw-r--r--src/libstore/pathlocks.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc
index 620c9a6b7..559737992 100644
--- a/src/libstore/pathlocks.cc
+++ b/src/libstore/pathlocks.cc
@@ -13,7 +13,7 @@
namespace nix {
-int openLockFile(const Path & path, bool create)
+AutoCloseFD openLockFile(const Path & path, bool create)
{
AutoCloseFD fd;
@@ -21,7 +21,7 @@ int openLockFile(const Path & path, bool create)
if (!fd && (create || errno != ENOENT))
throw SysError(format("opening lock file ‘%1%’") % path);
- return fd.release();
+ return fd;
}