about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/pathlocks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/pathlocks.cc')
-rw-r--r--third_party/nix/src/libstore/pathlocks.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/pathlocks.cc b/third_party/nix/src/libstore/pathlocks.cc
index 7c528e876eed..4b153856d283 100644
--- a/third_party/nix/src/libstore/pathlocks.cc
+++ b/third_party/nix/src/libstore/pathlocks.cc
@@ -37,7 +37,7 @@ void deleteLockFile(const Path& path, int fd) {
 }
 
 bool lockFile(int fd, LockType lockType, bool wait) {
-  int type = 0;
+  int type;
   if (lockType == ltRead) {
     type = LOCK_SH;
   } else if (lockType == ltWrite) {
@@ -119,7 +119,7 @@ bool PathLocks::lockPaths(const PathSet& paths, const std::string& waitMsg,
 
       /* Check that the lock file hasn't become stale (i.e.,
          hasn't been unlinked). */
-      struct stat st {};
+      struct stat st;
       if (fstat(fd.get(), &st) == -1) {
         throw SysError(format("statting lock file '%1%'") % lockPath);
       }