From cvs-return-5317-apmail-apr-cvs-archive=apr.apache.org@apr.apache.org Mon Nov 17 00:18:46 2003 Return-Path: Delivered-To: apmail-apr-cvs-archive@www.apache.org Received: (qmail 23574 invoked from network); 17 Nov 2003 00:18:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 17 Nov 2003 00:18:45 -0000 Received: (qmail 24633 invoked by uid 500); 17 Nov 2003 00:18:30 -0000 Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 24600 invoked by uid 500); 17 Nov 2003 00:18:30 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 24566 invoked from network); 17 Nov 2003 00:18:29 -0000 Date: 17 Nov 2003 00:18:44 -0000 Message-ID: <20031117001844.23488.qmail@minotaur.apache.org> From: wrowe@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/random/unix apr_random.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N wrowe 2003/11/16 16:18:44 Modified: random/unix apr_random.c Log: Correct signedness of abs values. Reviewed by Will Rowe, Ben Laurie Revision Changes Path 1.8 +6 -6 apr/random/unix/apr_random.c Index: apr_random.c =================================================================== RCS file: /home/cvs/apr/random/unix/apr_random.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- apr_random.c 16 Nov 2003 23:49:15 -0000 1.7 +++ apr_random.c 17 Nov 2003 00:18:44 -0000 1.8 @@ -75,8 +75,8 @@ typedef struct apr_random_pool_t { unsigned char *pool; - int bytes; - int pool_size; + unsigned int bytes; + unsigned int pool_size; } apr_random_pool_t; #define hash_init(h) (h)->init(h) @@ -126,7 +126,7 @@ apr_crypto_hash_t *key_hash, apr_crypto_hash_t *prng_hash) { - int n; + unsigned int n; g->apr_pool = p; @@ -208,7 +208,7 @@ static void rekey(apr_random_t *g) { - int n; + unsigned int n; unsigned char *H = H_current(g); hash_init(g->key_hash); @@ -238,7 +238,7 @@ APR_DECLARE(void) apr_random_add_entropy(apr_random_t *g,const void *entropy_, apr_size_t bytes) { - int n; + unsigned int n; const unsigned char *entropy = entropy_; for (n = 0; n < bytes; ++n) { @@ -257,7 +257,7 @@ p->pool[p->bytes++] = entropy[n]; if (p->bytes == g->rehash_size) { - int r; + unsigned int r; for (r = 0; r < p->bytes/2; r+=g->pool_hash->size) hash(g->pool_hash,p->pool+r,p->pool+r*2,g->pool_hash->size*2);