}
if (size > 0 && size < MAX_REQUEST_ARGUMENT_SIZE) {
- value = (void *)malloc(sizeof(void) * size);
+ value = (void *)malloc(sizeof(char) * size);
if (value == NULL) {
_LOGE("Out of mememory");
retval = DATA_CONTROL_ERROR_IO_ERROR;
goto out;
}
_LOGE("value : %s", (char *)value);
- if (write(result_fd, value, sizeof(void) * size) == -1) {
+ if (write(result_fd, value, sizeof(char) * size) == -1) {
_LOGE("Writing a value to a file descriptor is failed. errno = %d", errno);
retval = DATA_CONTROL_ERROR_IO_ERROR;
goto out;
return DATA_CONTROL_ERROR_IO_ERROR;
buf_len = sizeof(int) * 2 + size;
- buf = calloc(buf_len, sizeof(void));
+ buf = calloc(buf_len, sizeof(char));
if (buf == NULL) {
_LOGE("calloc failed");
return DATA_CONTROL_ERROR_OUT_OF_MEMORY;
set_last_result(DATA_CONTROL_ERROR_OUT_OF_MEMORY);
return NULL;
}
- memset(sql, 0, sql_len);
snprintf(sql, sql_len, "INSERT INTO %s (", data_id);
free(data_id);
set_last_result(DATA_CONTROL_ERROR_OUT_OF_MEMORY);
return NULL;
}
- memset(sql, 0, sql_len);
snprintf(sql, sql_len, "DELETE FROM %s", data_id);
if (where) {
set_last_result(DATA_CONTROL_ERROR_OUT_OF_MEMORY);
return NULL;
}
- memset(sql, 0, sql_len);
snprintf(sql, sql_len, "UPDATE %s SET ", data_id);
free(data_id);
set_last_result(DATA_CONTROL_ERROR_OUT_OF_MEMORY);
return NULL;
}
- memset(sql, 0, sql_len);
strncpy(sql, "SELECT ", sql_len);
if (!column_list) {