if (CALENDAR_ERROR_NONE != ret)
break;
- calendar_list_add(l, record);
+ if (calendar_list_add(l, record) != CALENDAR_ERROR_NONE)
+ DBG(" calendar_list_add Failed \n ");
}
}
return;
DBG("No directory[%s]", directory);
- mkdir(directory, mode);
+ if (mkdir(directory, mode) != 0)
+ printf("Failed to make new directory\n");
}
static void _cal_server_set_directory_permission(const char* file, mode_t mode)
if (ret == -2) {
/* LCOV_EXCL_START */
ERR("need_to_remove(%d)", ret);
- remove(CAL_DB_SHM_FILE);
- remove(CAL_DB_WAL_FILE);
- remove(CAL_DB_FILE);
+ if (remove(CAL_DB_SHM_FILE) != 0)
+ ERR("Failed to remove CAL_DB_SHM_FILE");
+ if (remove(CAL_DB_WAL_FILE) != 0)
+ ERR("Failed to remove CAL_DB_WAL_FILE");
+ if (remove(CAL_DB_FILE))
+ ERR("Failed to remove CAL_DB_FILE");
need_to_remove = false;
/* LCOV_EXCL_STOP */
} else {
/* make: projection */
ret = cal_db_query_create_projection(query, &projection);
+ if (ret = CALENDAR_ERROR_NONE)
+ ERR("cal_db_query_create_projection() Fail(%d) \n", ret);
char *query_str = NULL;
/* query: projection */
/* order */
char *order = NULL;
ret = cal_db_query_create_order(query, condition, &order);
+ if (ret = CALENDAR_ERROR_NONE)
+ ERR("cal_db_query_create_order() Fail(%d) \n", ret);
if (order) {
cal_db_append_string(&query_str, order);
CAL_FREE(order);
/* make: projection */
ret = cal_db_query_create_projection(query, &projection);
+ if (ret != CALENDAR_ERROR_NONE)
+ ERR("cal_db_query_create_projection() Fail(%d)", ret);
char *query_str = NULL;
/* query: projection */
/* order */
char *order = NULL;
ret = cal_db_query_create_order(query, condition, &order);
+ if (ret != CALENDAR_ERROR_NONE)
+ ERR("cal_db_query_create_order() Fail(%d)", ret);
if (order) {
cal_db_append_string(&query_str, order);
CAL_FREE(order);