diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c
index 83b0cf6fcc584334e0bfa0eb20b2e74615113fa3..abfe66c89a8483a1b1fb9d482ed5857f889f7d1e 100644 (file)
--- a/src/rrd_fetch.c
+++ b/src/rrd_fetch.c
}
for (i = 0; (unsigned long) i < rrd.stat_head->ds_cnt; i++) {
- if ((((*ds_namv)[i]) = malloc(sizeof(char) * DS_NAM_SIZE)) == NULL) {
+ if ((((*ds_namv)[i]) = (char*)malloc(sizeof(char) * DS_NAM_SIZE)) == NULL) {
rrd_set_error("malloc fetch ds_namv entry");
goto err_free_ds_namv;
}
** database is the one with time stamp (t+s) which means t to t+s.
*/
*ds_cnt = rrd.stat_head->ds_cnt;
- if (((*data) = malloc(*ds_cnt * rows * sizeof(rrd_value_t))) == NULL) {
+ if (((*data) = (rrd_value_t*)malloc(*ds_cnt * rows * sizeof(rrd_value_t))) == NULL) {
rrd_set_error("malloc fetch data area");
goto err_free_all_ds_namv;
}