aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.cpp
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2018-11-24 20:49:08 -0600
committerBen Woosley <ben.woosley@gmail.com>2018-11-24 21:05:48 -0600
commit4a86a0acd9ac3ca392f0584a5fd079a856e5e4ba (patch)
tree33c6ddfc06796a2b7e5bb98da1076969c02c5080 /src/wallet/db.cpp
parent1a9f9f7e5e2e73fb832f5b96ad7e9e57954f3f3c (diff)
Make SafeDbt DB_DBT_MALLOC on default initialization
If we're constructing the SafeDbt without provided data, it is always malloced, so that is the case we expose. Also run clang-format.
Diffstat (limited to 'src/wallet/db.cpp')
-rw-r--r--src/wallet/db.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 9bac3c49cc..b3ae3b92ab 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -247,12 +247,12 @@ BerkeleyEnvironment::VerifyResult BerkeleyEnvironment::Verify(const std::string&
return (fRecovered ? VerifyResult::RECOVER_OK : VerifyResult::RECOVER_FAIL);
}
-BerkeleyBatch::SafeDbt::SafeDbt(u_int32_t flags)
+BerkeleyBatch::SafeDbt::SafeDbt()
{
- m_dbt.set_flags(flags);
+ m_dbt.set_flags(DB_DBT_MALLOC);
}
-BerkeleyBatch::SafeDbt::SafeDbt(void *data, size_t size)
+BerkeleyBatch::SafeDbt::SafeDbt(void* data, size_t size)
: m_dbt(data, size)
{
}