From: Junghyun Yeon Date: Thu, 3 Sep 2020 08:49:11 +0000 (+0900) Subject: Change global variables into static X-Git-Tag: accepted/tizen/6.0/unified/20201030.122209~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=4682ccd7ed8a6942eaab6897dfef6510b11811cc;p=platform%2Fcore%2Fappfw%2Fapp2sd.git Change global variables into static Change-Id: Id6a88f8bcdd0b045c1a5bde5fe26bd4014bba96a Signed-off-by: Junghyun Yeon --- diff --git a/plugin/app2sd/server/app2sd_internals_registry.c b/plugin/app2sd/server/app2sd_internals_registry.c index 07e13de..3e20af6 100644 --- a/plugin/app2sd/server/app2sd_internals_registry.c +++ b/plugin/app2sd/server/app2sd_internals_registry.c @@ -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))" diff --git a/plugin/app2sd/server/app2sd_server.c b/plugin/app2sd/server/app2sd_server.c index 9c6f40c..a2ff768 100644 --- a/plugin/app2sd/server/app2sd_server.c +++ b/plugin/app2sd/server/app2sd_server.c @@ -23,10 +23,10 @@ #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) { diff --git a/test/src/test_app2ext.c b/test/src/test_app2ext.c index 05f86c4..9c7142c 100644 --- a/test/src/test_app2ext.c +++ b/test/src/test_app2ext.c @@ -42,12 +42,12 @@ #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",