]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Don't update pdp_new[] in-place, this is a bad practice from the
authorMaksym Sobolyev <sobomax@sippysoft.com>
Wed, 17 Sep 2014 00:54:03 +0000 (17:54 -0700)
committerMaksym Sobolyev <sobomax@sippysoft.com>
Wed, 17 Sep 2014 00:54:03 +0000 (17:54 -0700)
error-handling prospective.

src/rrd_update.c

index 1f9d16c8df1098310d07d3903f12332a07d02555..bd1bf22884a508cebcb871dd3fd8ce0b906ce073 100644 (file)
@@ -1421,7 +1421,7 @@ static int update_pdp_prep(
                 }
                 break;
             case DST_ABSOLUTE:
-                if( rrd_strtodbl(updvals[ds_idx + 1], NULL, &pdp_new[ds_idx], "Function update_pdp_prep, case DST_ABSOLUTE" ) != 2 ) {
+                if( rrd_strtodbl(updvals[ds_idx + 1], NULL, &newval, "Function update_pdp_prep, case DST_ABSOLUTE" ) != 2 ) {
                     return -1;
                 }
                 pdp_new[ds_idx] = newval;