Skip to content

Commit

Permalink
nix verify: Fix uninitialized variable
Browse files Browse the repository at this point in the history
(cherry picked from commit 95cf23e)
  • Loading branch information
edolstra committed Oct 10, 2019
1 parent 21f48ff commit 61e8162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nix/verify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct CmdVerify : StorePathsCommand
bool noContents = false;
bool noTrust = false;
Strings substituterUris;
size_t sigsNeeded;
size_t sigsNeeded = 0;

CmdVerify()
{
Expand Down Expand Up @@ -113,7 +113,7 @@ struct CmdVerify : StorePathsCommand
else {

StringSet sigsSeen;
size_t actualSigsNeeded = sigsNeeded ? sigsNeeded : 1;
size_t actualSigsNeeded = std::max(sigsNeeded, (size_t) 1);
size_t validSigs = 0;

auto doSigs = [&](StringSet sigs) {
Expand Down

0 comments on commit 61e8162

Please sign in to comment.