You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/10/06 08:51:33 UTC
cvs commit: apr/random/unix apr_random.c
jorton 2004/10/05 23:51:33
Modified: random/unix apr_random.c
Log:
* random/unix/apr_random.c (apr_random_init): Zero-initialize H and
H_waiting fields to fix spurious test failures.
Submitted by: Mladen Turk
Revision Changes Path
1.10 +2 -2 apr/random/unix/apr_random.c
Index: apr_random.c
===================================================================
RCS file: /home/cvs/apr/random/unix/apr_random.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -d -w -u -r1.9 -r1.10
--- apr_random.c 28 Feb 2004 18:31:41 -0000 1.9
+++ apr_random.c 6 Oct 2004 06:51:33 -0000 1.10
@@ -111,8 +111,8 @@
/2)*g->pool_hash->size*2;
g->reseed_size = APR_RANDOM_DEFAULT_RESEED_SIZE;
- g->H = apr_palloc(p,H_size(g));
- g->H_waiting = apr_palloc(p,H_size(g));
+ g->H = apr_pcalloc(p,H_size(g));
+ g->H_waiting = apr_pcalloc(p,H_size(g));
g->randomness = apr_palloc(p,B_size(g));
g->random_bytes = 0;