X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_update.c;h=51c913677d21372ebf9fe034cfe99372ad267c35;hb=734468bcc23497c7eba0deba87c92aa219fd46d1;hp=0f32121e35094bab9b02a760f7eead04e2c8e5ec;hpb=b244c918dd034a4951e2318140b1d4ef132b6657;p=rrdtool.git diff --git a/src/rrd_update.c b/src/rrd_update.c index 0f32121..51c9136 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2.15 Copyright by Tobi Oetiker, 1997-2006 + * RRDtool 1.2.17 Copyright by Tobi Oetiker, 1997-2006 ***************************************************************************** * rrd_update.c RRD Update Function ***************************************************************************** @@ -590,8 +590,7 @@ _rrd_update(char *filename, char *tmplt, int argc, char **argv, dst_idx= dst_conv(rrd.ds_def[i].dst); /* make sure we do not build diffs with old last_ds values */ - if(rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt < interval - && ( dst_idx == DST_COUNTER || dst_idx == DST_DERIVE)){ + if(rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt < interval) { strncpy(rrd.pdp_prep[i].last_ds,"U",LAST_DS_LEN-1); rrd.pdp_prep[i].last_ds[LAST_DS_LEN-1]='\0'; } @@ -702,11 +701,8 @@ _rrd_update(char *filename, char *tmplt, int argc, char **argv, rrd.pdp_prep[i].last_ds, updvals[i+1], pdp_new[i]); #endif - if(dst_idx == DST_COUNTER || dst_idx == DST_DERIVE){ - strncpy(rrd.pdp_prep[i].last_ds, - updvals[i+1],LAST_DS_LEN-1); - rrd.pdp_prep[i].last_ds[LAST_DS_LEN-1]='\0'; - } + strncpy(rrd.pdp_prep[i].last_ds, updvals[i+1],LAST_DS_LEN-1); + rrd.pdp_prep[i].last_ds[LAST_DS_LEN-1]='\0'; } /* break out of the argument parsing loop if the error_string is set */ if (rrd_test_error()){