Changed to 'const char *' from 'char *'.
Change-Id: I69ae01483899c646ec28b2c27f6a6c059635411f
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
return 0;
}
-static char *_get_db_path(uid_t uid)
+static const char *_get_db_path(uid_t uid)
{
const char *path;
tzplatform_reset_user();
- return strdup(path);
+ return path;
}
sqlite3 *_open_db(uid_t uid, bool readonly)
{
int ret;
sqlite3 *db;
- char *path;
+ const char *path;
path = _get_db_path(uid);
NULL);
if (ret != SQLITE_OK) {
LOGE("open db(%s) error: %d", path, ret);
- free(path);
return NULL;
}
/* turn on foreign keys */
if (sqlite3_exec(db, "PRAGMA foreign_keys = ON", NULL, NULL, NULL)) {
- free(path);
sqlite3_close_v2(db);
return NULL;
}
- free(path);
-
return db;
}