serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1711397 - /serf/trunk/test/test_buckets.c
Date Fri, 30 Oct 2015 00:58:29 GMT
Author: rhuijben
Date: Fri Oct 30 00:58:29 2015
New Revision: 1711397

URL: http://svn.apache.org/viewvc?rev=1711397&view=rev
Log:
* test/test_buckets.c
  (test_deflate_4GBplus_buckets): Use a 64 bit type to calculate a
    total size that may not fit in a potentially 32 bit apr_size_t.

Modified:
    serf/trunk/test/test_buckets.c

Modified: serf/trunk/test/test_buckets.c
URL: http://svn.apache.org/viewvc/serf/trunk/test/test_buckets.c?rev=1711397&r1=1711396&r2=1711397&view=diff
==============================================================================
--- serf/trunk/test/test_buckets.c (original)
+++ serf/trunk/test/test_buckets.c Fri Oct 30 00:58:29 2015
@@ -1662,7 +1662,7 @@ static void test_deflate_4GBplus_buckets
     serf_bucket_t *defbkt = create_gzip_deflate_bucket(aggbkt, &zdestr, alloc);
     serf_bucket_t *strbkt;
     apr_pool_t *iter_pool;
-    apr_size_t actual_size;
+    apr_uint64_t actual_size;
     unsigned long unc_crc = 0;
     unsigned long unc_length = 0;
 
@@ -1752,7 +1752,11 @@ static void test_deflate_4GBplus_buckets
             break;
     }
 
-    CuAssertTrue(tc, actual_size == (apr_size_t)NR_OF_LOOPS * BUFSIZE);
+    {
+        apr_uint64_t expected_size = (apr_uint64_t)NR_OF_LOOPS *
+                                     (apr_uint64_t)BUFSIZE;
+        CuAssertTrue(tc, actual_size == expected_size);
+    }
 #undef NR_OF_LOOPS
 #undef BUFSIZE
 }



Mime
View raw message