X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_update.c;h=c5bd1bf4f1312e2af0b42f5982cc21814f249cd3;hp=b3cc86c801ab6c3f51e4eccec24a2df4bf368ca0;hb=299d1636596a1911659e0a53bfad5c47e72835e0;hpb=40cc8b00296079815f08c2ff55f134efae83ea69 diff --git a/src/rrd_update.c b/src/rrd_update.c index b3cc86c..c5bd1bf 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1745,8 +1745,14 @@ static rrd_value_t calculate_cdp_val( rrd_value_t pdp_temp_val, unsigned long elapsed_pdp_st, int current_cf, +#ifdef DEBUG int i, - int ii) + int ii +#else + int UNUSED(i), + int UNUSED(ii) +#endif +) { if (isnan(cdp_val)) { if (current_cf == CF_AVERAGE) { @@ -1963,7 +1969,7 @@ static int write_RRA_row( rrd->cdp_prep[cdp_idx].scratch[CDP_scratch_idx].u_val, rrd_file->pos, rrd->rra_def[rra_idx].cf_nam); #endif - if (pcdp_summary != NULL) { + if (*pcdp_summary != NULL) { iv.u_val = rrd->cdp_prep[cdp_idx].scratch[CDP_scratch_idx].u_val; /* append info to the return hash */ *pcdp_summary = info_push(*pcdp_summary,