aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-01-23 17:25:12 +0100
committerWladimir J. van der Laan <[email protected]>2014-01-23 17:25:39 +0100
commit6403c6c835a3302a6ee575576be93e4104a39685 (patch)
treeeeca53e065947846648d9373f240d593c0c0ecfc /src/db.cpp
parentbuild: fix typo in configure help message (diff)
parentRemove redundant .c_str()s (diff)
downloaddiscoin-6403c6c835a3302a6ee575576be93e4104a39685.tar.xz
discoin-6403c6c835a3302a6ee575576be93e4104a39685.zip
Merge pull request #3549
7d9d134 Remove redundant .c_str()s (Wladimir J. van der Laan) b77dfdc Typesafe strprintf/error/LogPrint functions (Wladimir J. van der Laan)
Diffstat (limited to 'src/db.cpp')
-rw-r--r--src/db.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 1f2ee1c55..51c28cda6 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -75,7 +75,7 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
filesystem::path pathLogDir = path / "database";
filesystem::create_directory(pathLogDir);
filesystem::path pathErrorFile = path / "db.log";
- LogPrintf("dbenv.open LogDir=%s ErrorFile=%s\n", pathLogDir.string().c_str(), pathErrorFile.string().c_str());
+ LogPrintf("dbenv.open LogDir=%s ErrorFile=%s\n", pathLogDir.string(), pathErrorFile.string());
unsigned int nEnvFlags = 0;
if (GetBoolArg("-privdb", true))
@@ -353,7 +353,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
bitdb.mapFileUseCount.erase(strFile);
bool fSuccess = true;
- LogPrintf("Rewriting %s...\n", strFile.c_str());
+ LogPrintf("Rewriting %s...\n", strFile);
string strFileRes = strFile + ".rewrite";
{ // surround usage of db with extra {}
CDB db(strFile.c_str(), "r");
@@ -367,7 +367,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
0);
if (ret > 0)
{
- LogPrintf("Cannot create database file %s\n", strFileRes.c_str());
+ LogPrintf("Cannot create database file %s\n", strFileRes);
fSuccess = false;
}
@@ -423,7 +423,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
fSuccess = false;
}
if (!fSuccess)
- LogPrintf("Rewriting of %s FAILED!\n", strFileRes.c_str());
+ LogPrintf("Rewriting of %s FAILED!\n", strFileRes);
return fSuccess;
}
}
@@ -448,17 +448,17 @@ void CDBEnv::Flush(bool fShutdown)
{
string strFile = (*mi).first;
int nRefCount = (*mi).second;
- LogPrint("db", "%s refcount=%d\n", strFile.c_str(), nRefCount);
+ LogPrint("db", "%s refcount=%d\n", strFile, nRefCount);
if (nRefCount == 0)
{
// Move log data to the dat file
CloseDb(strFile);
- LogPrint("db", "%s checkpoint\n", strFile.c_str());
+ LogPrint("db", "%s checkpoint\n", strFile);
dbenv.txn_checkpoint(0, 0, 0);
- LogPrint("db", "%s detach\n", strFile.c_str());
+ LogPrint("db", "%s detach\n", strFile);
if (!fMockDb)
dbenv.lsn_reset(strFile.c_str(), 0);
- LogPrint("db", "%s closed\n", strFile.c_str());
+ LogPrint("db", "%s closed\n", strFile);
mapFileUseCount.erase(mi++);
}
else