]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
maxint is 2^32-1 562/head
authorTobias Oetiker <tobi@oetiker.ch>
Tue, 18 Nov 2014 11:04:44 +0000 (12:04 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Tue, 18 Nov 2014 11:04:44 +0000 (12:04 +0100)
src/rrd_update.c

index 77644681c87dedc7f1b655b11f17f3ba1cae0f6c..cbce8404eb8837f000bf3d70d34b040c83288d16 100644 (file)
@@ -1412,7 +1412,7 @@ static int update_pdp_prep(
                          * ... are there any others in SNMP land?
                          */
                         if (pdp_new[ds_idx] < (double) 0.0)
-                            pdp_new[ds_idx] += (double) 4294967296.0;   /* 2^32 */
+                            pdp_new[ds_idx] += (double) 4294967295.0;   /* 2^32-1 */
                         if (pdp_new[ds_idx] < (double) 0.0)
                             pdp_new[ds_idx] += (double) 18446744069414584320.0; /* 2^64-2^32 */
                     }