From: Tobias Oetiker Date: Fri, 23 Aug 2013 14:21:33 +0000 (+0200) Subject: 4294967296 has to be treaded as long long for this to work ... help the compiler... X-Git-Tag: v1.5.0-rc1~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfbdf67a169b25a05b13c3736ef7db27ef981223;p=thirdparty%2Frrdtool-1.x.git 4294967296 has to be treaded as long long for this to work ... help the compiler see this --- diff --git a/src/rrd_create.c b/src/rrd_create.c index 10f0b24e..e9094c68 100644 --- a/src/rrd_create.c +++ b/src/rrd_create.c @@ -480,7 +480,7 @@ int rrd_create_r2( if (row_cnt <= 0) rrd_set_error("Invalid row count: %i", row_cnt); #if SIZEOF_TIME_T == 4 - if ((long long) pdp_step * rrd.rra_def[rrd.stat_head->rra_cnt].pdp_cnt * row_cnt > 4294967296){ + if ((long long) pdp_step * rrd.rra_def[rrd.stat_head->rra_cnt].pdp_cnt * row_cnt > 4294967296LL){ /* database timespan > 2**32, would overflow time_t */ rrd_set_error("The time spanned by the database is too large: must be <= 4294967296 seconds"); }