diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-20T21·27+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-20T21·27+0100 |
commit | 689ef502f5b0655c9923ed77da2ae3504630f473 (patch) | |
tree | 3e331c153646f136875f047cc3b9f0aad8c86341 /third_party/nix/src/nix/verify.cc | |
parent | d331d3a0b5c497a46e2636f308234be66566c04c (diff) |
refactor(3p/nix): Apply clang-tidy's readability-* fixes r/788
This applies the readability fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html
Diffstat (limited to 'third_party/nix/src/nix/verify.cc')
-rw-r--r-- | third_party/nix/src/nix/verify.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/third_party/nix/src/nix/verify.cc b/third_party/nix/src/nix/verify.cc index 6b74761ba7..63dd181e07 100644 --- a/third_party/nix/src/nix/verify.cc +++ b/third_party/nix/src/nix/verify.cc @@ -94,7 +94,7 @@ struct CmdVerify : StorePathsCommand { if (!noTrust) { bool good = false; - if (info->ultimate && !sigsNeeded) { + if (info->ultimate && (sigsNeeded == 0u)) { good = true; } else { @@ -104,7 +104,7 @@ struct CmdVerify : StorePathsCommand { auto doSigs = [&](StringSet sigs) { for (auto sig : sigs) { - if (sigsSeen.count(sig)) { + if (sigsSeen.count(sig) != 0u) { continue; } sigsSeen.insert(sig); @@ -162,7 +162,8 @@ struct CmdVerify : StorePathsCommand { pool.process(); - throw Exit((corrupted ? 1 : 0) | (untrusted ? 2 : 0) | (failed ? 4 : 0)); + throw Exit((corrupted != 0u ? 1 : 0) | (untrusted != 0u ? 2 : 0) | + (failed != 0u ? 4 : 0)); } }; |