X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_xport.c;h=cceefe26f636d816ad5bc41228d8c621caabb18f;hb=110ae8b7e4893e9c641a8fcf9e787e2a0d4988ea;hp=488c24c3edbd057e005e2bf8c640544da6d9a549;hpb=e59507fce724b583cf9ab2c402907bd2c9d3f91e;p=rrdtool.git diff --git a/src/rrd_xport.c b/src/rrd_xport.c index 488c24c..cceefe2 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -128,7 +128,7 @@ rrd_xport(int argc, char **argv, int *xsize, char varname[30],*rpnex; gdes_alloc(&im); if(sscanf(argv[i],"%10[A-Z0-9]:%n",symname,&argstart)==1){ - if((im.gdes[im.gdes_c-1].gf=gf_conv(symname))==-1){ + if((int)(im.gdes[im.gdes_c-1].gf=gf_conv(symname))==-1){ im_free(&im); rrd_set_error("unknown function '%s'",symname); return -1; @@ -199,7 +199,7 @@ rrd_xport(int argc, char **argv, int *xsize, im.gdes[im.gdes_c-1].vname); return -1; } - if((im.gdes[im.gdes_c-1].cf=cf_conv(symname))==-1){ + if((int)(im.gdes[im.gdes_c-1].cf=cf_conv(symname))==-1){ im_free(&im); rrd_set_error("unknown cf '%s'",symname); return -1; @@ -376,8 +376,10 @@ rrd_xport_fn(image_desc_t *im, if ((legend_list[j] = malloc(sizeof(char) * (FMT_LEG_LEN+5)))==NULL) { free(srcptr_list); free(ref_list); + free(*data); *data = NULL; + while (--j > -1) free(legend_list[j]); free(legend_list); - rrd_set_error("malloc xprint legend entry"); + rrd_set_error("malloc xport legend entry"); return(-1); } @@ -394,8 +396,8 @@ rrd_xport_fn(image_desc_t *im, } /* fill data structure */ - for(dst_row = 0; dst_row < row_cnt; dst_row++) { - for(i = 0; i < nof_xports; i++) { + for(dst_row = 0; (int)dst_row < (int)row_cnt; dst_row++) { + for(i = 0; i < (int)nof_xports; i++) { j = ref_list[i]; ii = im->gdes[j].vidx; ds_cnt = &im->gdes[ii].ds_cnt;