Skip to content
Snippets Groups Projects
Commit 8f37b0fd authored by jhawkins@chromium.org's avatar jhawkins@chromium.org
Browse files

Coverity: Initialize statement_cache_ in the constructor.

CID=1608
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/222024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27136 0039d316-1c4b-4281-b951-d872f2087c98
parent 1aa3613c
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <algorithm>
#include <string>
#include "base/string_util.h"
#include "chrome/browser/history/archived_database.h"
#include "chrome/common/sqlite_utils.h"
......@@ -17,6 +20,7 @@ static const int kCompatibleVersionNumber = 2;
ArchivedDatabase::ArchivedDatabase()
: db_(NULL),
statement_cache_(NULL),
transaction_nesting_(0) {
}
......@@ -80,7 +84,7 @@ void ArchivedDatabase::BeginTransaction() {
void ArchivedDatabase::CommitTransaction() {
DCHECK(db_);
DCHECK(transaction_nesting_ > 0) << "Committing too many transactions";
DCHECK_GT(transaction_nesting_, 0) << "Committing too many transactions";
transaction_nesting_--;
if (transaction_nesting_ == 0) {
int rv = sqlite3_exec(db_, "COMMIT", NULL, NULL, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment