Change global variables into static 37/243137/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 3 Sep 2020 08:49:11 +0000 (17:49 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 3 Sep 2020 08:49:11 +0000 (17:49 +0900)
Change-Id: Id6a88f8bcdd0b045c1a5bde5fe26bd4014bba96a
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
plugin/app2sd/server/app2sd_internals_registry.c
plugin/app2sd/server/app2sd_server.c
test/src/test_app2ext.c

index 07e13de..3e20af6 100644 (file)
@@ -40,7 +40,7 @@
 
 /*sqlite  db code*/
 #define APP2SD_DB_FILE tzplatform_mkpath(TZ_SYS_DB, ".app2sd.db")
-sqlite3 *app2sd_db;
+static sqlite3 *app2sd_db;
 #define QUERY_CREATE_TABLE_APP2SD "CREATE TABLE IF NOT EXISTS app2sd_info " \
        "(pkgid TEXT NOT NULL, password TEXT NOT NULL, " \
        "filename TEXT NOT NULL, uid INTEGER, PRIMARY KEY(pkgid, uid))"
index 9c6f40c..a2ff768 100644 (file)
 
 #define APPFW_UID 301
 
-int processing_busy_cnt;
-guint source_id;
+static int processing_busy_cnt;
+static guint source_id;
 
-GMainLoop *app2sd_mainloop = NULL;
+static GMainLoop *app2sd_mainloop = NULL;
 
 static void __free_dir_detail(gpointer data)
 {
index 05f86c4..9c7142c 100644 (file)
 #define OWNER_ROOT 0
 #define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)
 
-app2ext_handle *handle = NULL;
+static app2ext_handle *handle = NULL;
 
-char pkg_ro_content_rpm[3][5] = { "bin", "res", "lib" };
+static const char pkg_ro_content_rpm[3][5] = { "bin", "res", "lib" };
 
 #define COUNT_OF_ERROR_LIST APP2EXT_ERROR_ENUM_MAX
-char error_list[COUNT_OF_ERROR_LIST][100] = {
+static const char error_list[COUNT_OF_ERROR_LIST][100] = {
        "SUCCESS",
        "APP2EXT_ERROR_UNKNOWN",
        "APP2EXT_ERROR_INVALID_ARGUMENTS",