diff options
author | Hyunho Kang <hhstark.kang@samsung.com> | 2015-12-17 17:08:28 +0900 |
---|---|---|
committer | Hyunho Kang <hhstark.kang@samsung.com> | 2016-01-03 20:41:13 -0800 |
commit | 33848cbb1a051a40844383a1a62f69e7f8d1196e (patch) | |
tree | ebedb988d1e602982379bb2b6253591036e0af0f /src | |
parent | d2e1ea21f9faf51ca35ce4bb606deadbe7ab386a (diff) | |
download | librua-33848cbb1a051a40844383a1a62f69e7f8d1196e.tar.gz librua-33848cbb1a051a40844383a1a62f69e7f8d1196e.tar.bz2 librua-33848cbb1a051a40844383a1a62f69e7f8d1196e.zip |
Fix implicit declaration of function warning.
Change-Id: Icd6f05c060b4e808c02c56e0c14705af0511ee5e
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/rua_stat.c | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/src/rua_stat.c b/src/rua_stat.c index 094e39c..5502daa 100755 --- a/src/rua_stat.c +++ b/src/rua_stat.c @@ -53,6 +53,34 @@ static sqlite3 *_db = NULL; static int __exec(sqlite3 *db, char *query); static sqlite3 *__db_init(char *root, int flags); +int __rua_stat_init(int flags) +{ + char defname[FILENAME_MAX]; + const char *rua_stat_db_path = tzplatform_getenv(TZ_USER_DB); + + if (_db) + return 0; + + snprintf(defname, sizeof(defname), "%s/%s", rua_stat_db_path, RUA_STAT_DB_NAME); + _db = __db_init(defname, flags); + + if (_db == NULL) { + LOGW("__rua_stat_init error"); + return -1; + } + + return 0; +} + +int __rua_stat_fini(void) +{ + if (_db) { + db_util_close(_db); + _db = NULL; + } + + return 0; +} int __rua_stat_insert(char *caller, char *rua_stat_tag) { @@ -293,37 +321,6 @@ out: return r; } -int __rua_stat_init(int flags) -{ - - if (_db) { - return 0; - } - - char defname[FILENAME_MAX]; - const char *rua_stat_db_path = tzplatform_getenv(TZ_USER_DB); - snprintf(defname, sizeof(defname), "%s/%s", rua_stat_db_path, RUA_STAT_DB_NAME); - _db = __db_init(defname, flags); - - if (_db == NULL) { - LOGW("__rua_stat_init error"); - return -1; - } - - return 0; -} - -int __rua_stat_fini(void) -{ - - if (_db) { - db_util_close(_db); - _db = NULL; - } - - return 0; -} - static int __exec(sqlite3 *db, char *query) { int r; |