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);
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);
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);
}