diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-01-25T11·51+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-01-26T19·40+0100 |
commit | a55f589720e6499ed8ca1e3dd63ae18c52782150 (patch) | |
tree | 9bcc366d7ea1030a38d248e44efd5fb99bd8408d /src/libstore/pathlocks.cc | |
parent | c0f2f4eeeffd9c62ee2c59b42e6824d297d210f1 (diff) |
openLockFile: Return an AutoCloseFD
Diffstat (limited to 'src/libstore/pathlocks.cc')
-rw-r--r-- | src/libstore/pathlocks.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc index 620c9a6b752d..559737992798 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; } |