Fix build error 89/208589/1 accepted/tizen/unified/20190627.014804 submit/tizen/20190626.103135
authorwn.jang <wn.jang@samsung.com>
Wed, 26 Jun 2019 07:51:40 +0000 (16:51 +0900)
committerwn.jang <wn.jang@samsung.com>
Wed, 26 Jun 2019 07:59:14 +0000 (16:59 +0900)
Change-Id: Ida040f10099fe2cfb5d1f4aac3f1998ca37f231a

common/vc_cmd_db.c

index be4b790..ade3f93 100644 (file)
@@ -1376,7 +1376,7 @@ int vc_db_initialize(void)
                SLOG(LOG_ERROR, vc_db_tag(), "[ERROR] Fail to connect main DB, retry to connect after removing file");
                if (0 != remove(g_path)) {
                        SLOG(LOG_ERROR, vc_db_tag(), "[Error] remove file(%s) is failed", g_path);
-                       g_db_cnt = (g_db_cnt++) % 1000;
+                       g_db_cnt = (g_db_cnt + 1) % 1000;
                        snprintf(g_path, 256, "%s/.vc_info_%d.db", VC_RUNTIME_INFO_ROOT, g_db_cnt);
                }
                is_connect = __vc_db_connect_db(&g_path, &g_db_handle);
@@ -1399,7 +1399,7 @@ int vc_db_initialize(void)
                SLOG(LOG_ERROR, vc_db_tag(), "[ERROR] Fail to open DB");
                if (0 != remove(g_path)) {
                        SLOG(LOG_ERROR, vc_db_tag(), "[Error] remove file(%s) is failed", g_path);
-                       g_db_cnt = (g_db_cnt++) % 1000;
+                       g_db_cnt = (g_db_cnt + 1) % 1000;
                        snprintf(g_path, 256, "%s/.vc_info_%d.db", VC_RUNTIME_INFO_ROOT, g_db_cnt);
                }
                is_connect = __vc_db_connect_db(&g_path, &g_db_handle);
@@ -1422,7 +1422,7 @@ int vc_db_initialize(void)
        if (false == is_connect) {
                SLOG(LOG_ERROR, vc_db_tag(), "[ERROR] Fail to open backup DB, retry to connect after removing file");
                if (0 != remove(g_backup_path)) {
-                       g_backup_db_cnt = (g_backup_db_cnt++) % 1000;
+                       g_backup_db_cnt = (g_backup_db_cnt + 1) % 1000;
                        SLOG(LOG_ERROR, vc_db_tag(), "[Error] remove file(%s) is failed", g_backup_path);
                        snprintf(g_backup_path, 256, "%s/.vc_backup_%d.db", VC_RUNTIME_INFO_ROOT, g_backup_db_cnt);
                }