X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_fetch.c;h=abfe66c89a8483a1b1fb9d482ed5857f889f7d1e;hp=83b0cf6fcc584334e0bfa0eb20b2e74615113fa3;hb=aff0a2728543eee1ac21f3fa02f171caae8d9362;hpb=82d6afdfe67c94910cf72ea0d65c7e0cd1e9af7b diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c index 83b0cf6..abfe66c 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -258,7 +258,7 @@ int rrd_fetch_fn( } 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; } @@ -358,7 +358,7 @@ int rrd_fetch_fn( ** 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; }