apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r587619 - /apr/apr-util/branches/1.2.x/test/testrmm.c
Date Tue, 23 Oct 2007 19:14:56 GMT
Author: wrowe
Date: Tue Oct 23 12:14:55 2007
New Revision: 587619

URL: http://svn.apache.org/viewvc?rev=587619&view=rev
Log:
Backport corrections to testrmm.c for size_t > int

Backport: r587436

Modified:
    apr/apr-util/branches/1.2.x/test/testrmm.c

Modified: apr/apr-util/branches/1.2.x/test/testrmm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/test/testrmm.c?rev=587619&r1=587618&r2=587619&view=diff
==============================================================================
--- apr/apr-util/branches/1.2.x/test/testrmm.c (original)
+++ apr/apr-util/branches/1.2.x/test/testrmm.c Tue Oct 23 12:14:55 2007
@@ -37,7 +37,7 @@
     apr_shm_t *shm;
     apr_rmm_t *rmm;
     apr_size_t size, fragsize;
-    apr_rmm_off_t *off;
+    apr_rmm_off_t *off, off2;
     int i;
     void *entity;
 
@@ -66,15 +66,15 @@
     }
 
     /* Checking for out of memory allocation */
-    i = apr_rmm_malloc(rmm, FRAG_SIZE * FRAG_COUNT);
-    ABTS_INT_EQUAL(tc, i, 0);
+    off2 = apr_rmm_malloc(rmm, FRAG_SIZE * FRAG_COUNT);
+    ABTS_TRUE(tc, !off2);
 
     /* Checking each fragment for address alignment */
     for (i = 0; i < FRAG_COUNT; i++) {
         char *c = apr_rmm_addr_get(rmm, off[i]);
         apr_size_t sc = (apr_size_t)c;
 
-        ABTS_TRUE(tc, off[i]);
+        ABTS_TRUE(tc, !!off[i]);
         ABTS_TRUE(tc, !(sc & 7));
     }
 
@@ -137,8 +137,8 @@
     /* Checking realloc */
     off[0] = apr_rmm_calloc(rmm, SHARED_SIZE - 100);
     off[1] = apr_rmm_calloc(rmm, 100);
-    ABTS_TRUE(tc, off[0]);
-    ABTS_TRUE(tc, off[1]);
+    ABTS_TRUE(tc, !!off[0]);
+    ABTS_TRUE(tc, !!off[1]);
 
     entity = apr_rmm_addr_get(rmm, off[1]);
     rv = apr_rmm_free(rmm, off[0]);
@@ -157,7 +157,7 @@
 
     /* now we can realloc off[1] and get many more bytes */
     off[0] = apr_rmm_realloc(rmm, entity, SHARED_SIZE - 100);
-    ABTS_TRUE(tc, off[0]);
+    ABTS_TRUE(tc, !!off[0]);
 
     {
         unsigned char *c = apr_rmm_addr_get(rmm, off[0]);



Mime
View raw message