From 1ebcd504e931b1c555107d72732df4424aaa05d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20Ferreira=20Zulian?= Date: Fri, 5 Jun 2015 12:32:31 +0200 Subject: [PATCH] Small improvement on code readability. Comparing the value returned from sqlite3_open() with proper value. --- dram/src/common/TlmRecorder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dram/src/common/TlmRecorder.cpp b/dram/src/common/TlmRecorder.cpp index 58b8a4c8..36baa1cf 100644 --- a/dram/src/common/TlmRecorder.cpp +++ b/dram/src/common/TlmRecorder.cpp @@ -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);