diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-09 12:58:02 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-09 13:09:24 -0700 |
commit | 76f268b9bd1b69eb7784c5324abbb67f3e395b97 (patch) | |
tree | 3871ee223344c98c30939645dfa5fd4ff9128d7e /src/wallet | |
parent | 29f80cd230c38d7e424810e986c160ddba9b53ac (diff) | |
parent | 90593ed92cfd5d49900a6fb6c2c10a482ab9fdbb (diff) |
Merge #10521: Limit variable scope
90593ed92 Limit variable scope (practicalswift)
Tree-SHA512: 4719e303688a31aefbe1d239e86b21dd3c2045524e08bd628c6ba0c6c2a97de14d04305b9beafe0b1dcde7229793e6663168953f192e88ed409be5c30fd2a9a9
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/db.cpp | 2 | ||||
-rw-r--r-- | src/wallet/wallet.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 89f204bc31..df1fe4635f 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -360,7 +360,6 @@ void CDBEnv::CheckpointLSN(const std::string& strFile) CDB::CDB(CWalletDBWrapper& dbw, const char* pszMode, bool fFlushOnCloseIn) : pdb(NULL), activeTxn(NULL) { - int ret; fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w')); fFlushOnClose = fFlushOnCloseIn; env = dbw.env; @@ -383,6 +382,7 @@ CDB::CDB(CWalletDBWrapper& dbw, const char* pszMode, bool fFlushOnCloseIn) : pdb ++env->mapFileUseCount[strFile]; pdb = env->mapDb[strFile]; if (pdb == NULL) { + int ret; pdb = new Db(env->dbenv, 0); bool fMockDb = env->IsMock(); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index b2706d09f6..b3fed1c4dc 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3188,10 +3188,10 @@ void CWallet::ReturnKey(int64_t nIndex) bool CWallet::GetKeyFromPool(CPubKey& result, bool internal) { - int64_t nIndex = 0; CKeyPool keypool; { LOCK(cs_wallet); + int64_t nIndex = 0; ReserveKeyFromKeyPool(nIndex, keypool, internal); if (nIndex == -1) { |