From: Abhay agarwal Date: Mon, 9 Sep 2019 06:58:44 +0000 (+0530) Subject: [Fix] coding style and remove extra comments X-Git-Tag: accepted/tizen/unified/20190917.034055~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb27f68f886429acfb5c7837a0064ad3e70a89a6;p=platform%2Fcore%2Fconnectivity%2Fua-manager.git [Fix] coding style and remove extra comments Change-Id: I455546293fc2982e5433c52998ab42b580bad1b1 Signed-off-by: Abhay agarwal --- diff --git a/ua-daemon/src/ua-manager-db.c b/ua-daemon/src/ua-manager-db.c index 71e4bb5..6c91c7a 100644 --- a/ua-daemon/src/ua-manager-db.c +++ b/ua-daemon/src/ua-manager-db.c @@ -248,9 +248,6 @@ static int __uam_db_check_table_creation(void) FUNC_ENTRY; int error_code = UAM_ERROR_DB_FAILED; - /* - * 4) Each __is_table_existing() open DB file again and again.. it is redundant - */ if (!__uam_db_is_table_existing(UAM_DB_USERDATA_TABLE)) retv_if(UAM_ERROR_NONE != __uam_db_create_table(CREATE_USERDATA_TABLE), error_code); @@ -301,7 +298,7 @@ int _uam_db_initialize_once(void) int max_retries = 2; - do{ + do { /* open database */ retv_if(SQLITE_OK != __uam_db_open(), UAM_ERROR_DB_FAILED); @@ -310,14 +307,12 @@ int _uam_db_initialize_once(void) sqlite3_close(database); unlink(DATABASE_FULL_PATH); database = NULL; + retv_if(0 == max_retries, UAM_ERROR_DB_FAILED); } else { break; } - } while(max_retries--); + } while (max_retries--); - /* - * 3) Default journal mode is PERIST so it seems use-less. - */ /* Enable persist journal mode */ sql = sqlite3_mprintf("PRAGMA journal_mode = PERSIST"); retv_if(UAM_ERROR_NONE != __uam_db_exec_sql(sql, NULL), UAM_ERROR_DB_FAILED);