From: Tobias Oetiker Date: Tue, 18 Nov 2014 11:04:44 +0000 (+0100) Subject: maxint is 2^32-1 X-Git-Tag: v1.5.0-rc1~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F562%2Fhead;p=thirdparty%2Frrdtool-1.x.git maxint is 2^32-1 --- diff --git a/src/rrd_update.c b/src/rrd_update.c index 77644681..cbce8404 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -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 */ }