Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: Ic6214b86a824e5270110b537bd6012e674924793
static int __check_integrity()
{
+ int result = 0;
sqlite3_stmt *stmt = NULL;
if (db == 0) {
const char *ret_val = (const char *)sqlite3_column_text(stmt, 0);
DEBUG_ERR_MSG("ret_val: %s", ret_val);
if (ret_val && strcmp(ret_val, "ok") == 0) {
- return 0;
+ result = 0;
} else {
DEBUG_ERR_MSG("failed to check integrity");
- return -1;
+ result = -1;
}
- } else {
- return 0;
}
+
+ sqlite3_finalize(stmt);
}
- return 0;
+
+ return result;
}
static void __prepare_table()