diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-19T19·47+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-19T19·51+0100 |
commit | 39087321811e81e26a1a47d6967df1088dcf0e95 (patch) | |
tree | 57110be423eeb7869e9960466f4b17c0ea7cd961 /third_party/nix/src/nix/verify.cc | |
parent | cf40d08908ede4061eb15513b770c98877844b8b (diff) |
style(3p/nix): Final act in the brace-wrapping saga r/777
This last change set was generated by a full clang-tidy run (including compilation): clang-tidy -p ~/projects/nix-build/ \ -checks=-*,readability-braces-around-statements -fix src/*/*.cc Actually running clang-tidy requires some massaging to make it play nice with Nix + meson, I'll be adding a wrapper or something for that soon.
Diffstat (limited to 'third_party/nix/src/nix/verify.cc')
-rw-r--r-- | third_party/nix/src/nix/verify.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/third_party/nix/src/nix/verify.cc b/third_party/nix/src/nix/verify.cc index 3585176ed38f..6b74761ba75a 100644 --- a/third_party/nix/src/nix/verify.cc +++ b/third_party/nix/src/nix/verify.cc @@ -94,10 +94,10 @@ struct CmdVerify : StorePathsCommand { if (!noTrust) { bool good = false; - if (info->ultimate && !sigsNeeded) + if (info->ultimate && !sigsNeeded) { good = true; - else { + } else { StringSet sigsSeen; size_t actualSigsNeeded = std::max(sigsNeeded, (size_t)1); size_t validSigs = 0; @@ -109,13 +109,15 @@ struct CmdVerify : StorePathsCommand { } sigsSeen.insert(sig); if (validSigs < ValidPathInfo::maxSigs && - info->checkSignature(publicKeys, sig)) + info->checkSignature(publicKeys, sig)) { validSigs++; + } } }; - if (info->isContentAddressed(*store)) + if (info->isContentAddressed(*store)) { validSigs = ValidPathInfo::maxSigs; + } doSigs(info->sigs); @@ -125,8 +127,9 @@ struct CmdVerify : StorePathsCommand { } try { auto info2 = store2->queryPathInfo(info->path); - if (info2->isContentAddressed(*store)) + if (info2->isContentAddressed(*store)) { validSigs = ValidPathInfo::maxSigs; + } doSigs(info2->sigs); } catch (InvalidPath&) { } catch (Error& e) { @@ -153,8 +156,9 @@ struct CmdVerify : StorePathsCommand { } }; - for (auto& storePath : storePaths) + for (auto& storePath : storePaths) { pool.enqueue(std::bind(doPath, storePath)); + } pool.process(); |