X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_xport.c;h=5d3f3ebbb8eae57ed51daa221926e71df93aa025;hp=caf23d0cb2950541d7695c115bb5d0ea5b39b3ff;hb=f0a82ae15cafb6ad47ea0c9f74754820e92e2078;hpb=0b64d8b13cd477572685bc56c3269da14db800ed diff --git a/src/rrd_xport.c b/src/rrd_xport.c index caf23d0..5d3f3eb 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -233,20 +233,20 @@ int rrd_xport_fn( } /* a list of referenced gdes */ - ref_list = malloc(sizeof(int) * (*col_cnt)); + ref_list = (int*)malloc(sizeof(int) * (*col_cnt)); if (ref_list == NULL) return -1; /* a list to save pointers to the column's legend entry */ /* this is a return value! */ - legend_list = malloc(sizeof(char *) * (*col_cnt)); + legend_list = (char**)malloc(sizeof(char *) * (*col_cnt)); if (legend_list == NULL) { free(ref_list); return -1; } /* lets find the step size we have to use for xport */ - step_list = malloc(sizeof(long)*((*col_cnt)+1)); + step_list = (long*)malloc(sizeof(long)*((*col_cnt)+1)); step_list_ptr = step_list; j = 0; for (i = 0; i < im->gdes_c; i++) { @@ -254,12 +254,12 @@ int rrd_xport_fn( case GF_XPORT: ref_list[xport_counter++] = i; *step_list_ptr = im->gdes[im->gdes[i].vidx].step; - printf("%s:%lu\n",im->gdes[i].legend,*step_list_ptr); - *step_list_ptr++; + /* printf("%s:%lu\n",im->gdes[i].legend,*step_list_ptr); */ + step_list_ptr++; /* reserve room for one legend entry */ /* is FMT_LEG_LEN + 5 the correct size? */ if ((legend_list[j] = - malloc(sizeof(char) * (FMT_LEG_LEN + 5))) == NULL) { + (char*)malloc(sizeof(char) * (FMT_LEG_LEN + 5))) == NULL) { free(ref_list); *data = NULL; while (--j > -1) @@ -282,7 +282,7 @@ int rrd_xport_fn( *step_list_ptr=0; /* find a common step */ *step = lcd(step_list); - printf("step: %lu\n",*step); + /* printf("step: %lu\n",*step); */ free(step_list); *start = im->start - im->start % (*step); @@ -293,7 +293,7 @@ int rrd_xport_fn( /* this is a return value! */ row_cnt = ((*end) - (*start)) / (*step); if (((*data) = - malloc((*col_cnt) * row_cnt * sizeof(rrd_value_t))) == NULL) { + (rrd_value_t*)malloc((*col_cnt) * row_cnt * sizeof(rrd_value_t))) == NULL) { free(ref_list); free(legend_list); rrd_set_error("malloc xport data area");