refactor(3p/nix): Apply clang-tidy's readability-* fixes
This applies the readability fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html
This commit is contained in:
parent
d331d3a0b5
commit
689ef502f5
78 changed files with 863 additions and 792 deletions
5
third_party/nix/src/libstore/pathlocks.cc
vendored
5
third_party/nix/src/libstore/pathlocks.cc
vendored
|
|
@ -53,9 +53,8 @@ bool lockFile(int fd, LockType lockType, bool wait) {
|
|||
checkInterrupt();
|
||||
if (errno != EINTR) {
|
||||
throw SysError(format("acquiring/releasing lock"));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
while (flock(fd, type | LOCK_NB) != 0) {
|
||||
|
|
@ -104,7 +103,7 @@ bool PathLocks::lockPaths(const PathSet& paths, const string& waitMsg,
|
|||
/* Acquire an exclusive lock. */
|
||||
if (!lockFile(fd.get(), ltWrite, false)) {
|
||||
if (wait) {
|
||||
if (waitMsg != "") {
|
||||
if (!waitMsg.empty()) {
|
||||
LOG(WARNING) << waitMsg;
|
||||
}
|
||||
lockFile(fd.get(), ltWrite, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue