aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-08-29 10:37:24 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-08-29 10:53:47 +0200
commitfaeb341da3b52121a143b2309efaf246bd5ae29f (patch)
treeac310bf2b40b8b22ad22f33d18435860b54f4622 /src/db.cpp
parent3ed668dbe220168198e651f0cef38d29bd9bbbb0 (diff)
parent8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f (diff)
Merge pull request #4777
8bdd287 Fix a few "Uninitialized scalar field" warnings (Wladimir J. van der Laan)
Diffstat (limited to 'src/db.cpp')
-rw-r--r--src/db.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 8c139843a1..23d2cc988d 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -227,10 +227,10 @@ CDB::CDB(const char *pszFile, const char* pszMode) :
pdb(NULL), activeTxn(NULL)
{
int ret;
+ fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
if (pszFile == NULL)
return;
- fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
bool fCreate = strchr(pszMode, 'c');
unsigned int nFlags = DB_THREAD;
if (fCreate)