diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2017-06-04 22:45:22 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2017-06-05 00:52:36 +0200 |
commit | 90593ed92cfd5d49900a6fb6c2c10a482ab9fdbb (patch) | |
tree | 1f830a3679ef00b774dc8ac6b216366f2ed52a68 /src/wallet | |
parent | f259263a7b11c6ff925851985ef0082b0a190a57 (diff) |
Limit variable scope
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 25f6bdd9d9..2df438989a 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -361,7 +361,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; @@ -384,6 +383,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 bc98435249..2eed116dd3 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3196,10 +3196,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) { |