diff options
| author | Jeff Garzik <[email protected]> | 2012-04-22 13:22:39 -0400 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-04-22 13:22:39 -0400 |
| commit | faf705a42a05197d89abfc31672ced94d268767f (patch) | |
| tree | 4ebc78c985db96ba9e602b3c6c49ed8ecefc0d9a /src/wallet.cpp | |
| parent | Merge pull request #1124 from sipa/rpcobj3 (diff) | |
| download | discoin-faf705a42a05197d89abfc31672ced94d268767f.tar.xz discoin-faf705a42a05197d89abfc31672ced94d268767f.zip | |
Prefer 'unsigned int' for loop index variables tested against ::size()
C++ STL ::size() generally returns unsigned, which implies that "int idx"
style of loop variable will generate a signed-vs-unsigned comparison warning
when testing the loop exit condition "idx < blah.size()"
Update areas of the bitcoin code where loop variables may be more properly and
correctly defined as unsigned.
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 53836be0c..998909897 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1391,8 +1391,8 @@ bool CWallet::TopUpKeyPool() CWalletDB walletdb(strWalletFile); // Top up key pool - int64 nTargetSize = max(GetArg("-keypool", 100), (int64)0); - while (setKeyPool.size() < nTargetSize+1) + unsigned int nTargetSize = max(GetArg("-keypool", 100), 0LL); + while (setKeyPool.size() < (nTargetSize + 1)) { int64 nEnd = 1; if (!setKeyPool.empty()) |