diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-28 15:28:57 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-08-28 15:30:50 +0200 |
commit | 8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f (patch) | |
tree | ef7fed85ea38dde8929f15e02ff39c7e7b40da4a /src/db.cpp | |
parent | 11a899445edf3e07317eb312d3c1d9c71c06f618 (diff) |
Fix a few "Uninitialized scalar field" warnings
Fix a few warnings reported by Coverity.
None of these is critical, but making sure that class fields are
initialized can avoid heisenbugs.
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 2 |
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) |