Change-Id: I9ce6be6398c0b5e52345a2738bdb16f2fb26c5f8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
sqlite3 *db;
char *query;
char *db_path;
+ int value_idx;
int idx;
struct aul_compinfo_s *info;
int ret;
goto end;
}
- for (idx = AUL_COMPINFO_START; idx < AUL_COMPINFO_MAX; idx++) {
- if (idx == AUL_COMPINFO_COMP_ID)
- continue;
-
- ret = __save_column_str(stmt, idx, &info->value[idx]);
+ for (idx = AUL_COMPINFO_START; idx < AUL_COMPINFO_MAX - 1; idx++) {
+ value_idx = (idx < AUL_COMPINFO_COMP_ID) ? idx : idx + 1;
+ ret = __save_column_str(stmt, idx, &info->value[value_idx]);
if (ret != AUL_R_OK) {
__destroy_compinfo(info);
goto end;