Small improvement on code readability.

Comparing the value returned from sqlite3_open() with proper value.
This commit is contained in:
Éder Ferreira Zulian
2015-06-05 12:32:31 +02:00
parent 809c1fcb7d
commit 1ebcd504e9

View File

@@ -216,7 +216,7 @@ void TlmRecorder::openDB(std::string name)
boost::filesystem::wpath file(name);
if(boost::filesystem::exists(file))
boost::filesystem::remove(file);
if (sqlite3_open(name.c_str(), &db))
if (sqlite3_open(name.c_str(), &db) != SQLITE_OK)
{
SC_REPORT_FATAL("Error in TraceRecorder", "Error cannot open database");
sqlite3_close(db);