X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=program%2Fsrc%2Frrd_fetch.c;h=abfe66c89a8483a1b1fb9d482ed5857f889f7d1e;hb=786dfe0a9a72d3304d0fd8101535e22015756ff1;hp=83b0cf6fcc584334e0bfa0eb20b2e74615113fa3;hpb=e7aab28c3e9f20acb6cc8742f944577b7873a8c0;p=rrdtool-all.git diff --git a/program/src/rrd_fetch.c b/program/src/rrd_fetch.c index 83b0cf6f..abfe66c8 100644 --- a/program/src/rrd_fetch.c +++ b/program/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; }