]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fixed constant used in timespan check to be a long long. 406/head
authorNick <nick@example.com>
Sat, 20 Jul 2013 11:42:10 +0000 (12:42 +0100)
committerNick <nick@example.com>
Sat, 20 Jul 2013 11:42:10 +0000 (12:42 +0100)
This fixes a compiler warning on AIX in 32-bit with IBM XL C/C++ compiler.

src/rrd_create.c

index 10f0b24e9c4b8ce6c64c05d174b0f11c6e26b663..e9094c68e26520265781a2d45db717d7efac3eb1 100644 (file)
@@ -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");
                         }