summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2015-12-17 17:08:28 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2016-01-03 20:41:13 -0800
commit33848cbb1a051a40844383a1a62f69e7f8d1196e (patch)
treeebedb988d1e602982379bb2b6253591036e0af0f /src
parentd2e1ea21f9faf51ca35ce4bb606deadbe7ab386a (diff)
downloadlibrua-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-xsrc/rua_stat.c59
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;