apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r106082 - /apr/apr/branches/0.9.x/test/testrand.c
Date Sun, 21 Nov 2004 12:32:34 GMT
Author: jorton
Date: Sun Nov 21 04:32:33 2004
New Revision: 106082

Modified:
   apr/apr/branches/0.9.x/test/testrand.c
Log:
Merge r64682 from trunk:

* test/testrand.c (rand_exists): Don't ask for so much random
data.



Modified: apr/apr/branches/0.9.x/test/testrand.c
==============================================================================
--- apr/apr/branches/0.9.x/test/testrand.c	(original)
+++ apr/apr/branches/0.9.x/test/testrand.c	Sun Nov 21 04:32:33 2004
@@ -24,17 +24,13 @@
 #if !APR_HAS_RANDOM
     CuNotImpl(tc, "apr_generate_random_bytes");
 #else
-    apr_status_t rv;
-    unsigned char c[2048];
-    int i;
+    unsigned char c[42];
 
     /* There must be a better way to test random-ness, but I don't know
      * what it is right now.
      */
-    for (i = 1; i <= 8; i++) {
-        rv = apr_generate_random_bytes(c, i * 255);
-        apr_assert_success(tc, "apr_generate_random_bytes failed", rv);
-    }
+    apr_assert_success(tc, "apr_generate_random_bytes failed",
+                       apr_generate_random_bytes(c, sizeof c));
 #endif
 }    
 

Mime
View raw message