apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/test testrand.c
Date Sat, 04 Oct 2003 11:56:50 GMT
jorton      2003/10/04 04:56:50

  Modified:    test     testrand.c
  Log:
  * test/testrand.c (rand_exists): Don't ask for so much random
  data.
  
  Revision  Changes    Path
  1.11      +3 -7      apr/test/testrand.c
  
  Index: testrand.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testrand.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -u -r1.10 -r1.11
  --- testrand.c	1 Jan 2003 00:01:56 -0000	1.10
  +++ testrand.c	4 Oct 2003 11:56:50 -0000	1.11
  @@ -63,17 +63,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