summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormcgreer%netscape.com <devnull@localhost>2000-07-20 16:58:32 +0000
committermcgreer%netscape.com <devnull@localhost>2000-07-20 16:58:32 +0000
commit3a7572443d26f9b18c541c7e73e907c89df80892 (patch)
tree7fb66555bfba671799cad3564375c83bb7e633e9
parent685b7e8e1e82cfe78e7e7980ab95a401c5b9285a (diff)
downloadnss-hg-3a7572443d26f9b18c541c7e73e907c89df80892.tar.gz
some compilers don't like the void* arithmetic
-rw-r--r--security/nss/lib/freebl/prng_fips1861.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/security/nss/lib/freebl/prng_fips1861.c b/security/nss/lib/freebl/prng_fips1861.c
index 1e82015ce..cd5666cf2 100644
--- a/security/nss/lib/freebl/prng_fips1861.c
+++ b/security/nss/lib/freebl/prng_fips1861.c
@@ -358,6 +358,7 @@ prng_GenerateGlobalRandomBytes(RNGContext *rng,
{
PRUint8 num;
SECStatus rv;
+ unsigned char *output = dest;
/* check for a valid global RNG context */
PORT_Assert(rng != NULL);
if (rng == NULL) {
@@ -386,10 +387,10 @@ prng_GenerateGlobalRandomBytes(RNGContext *rng,
/* number of bytes to obtain on this iteration (max of 20) */
num = PR_MIN(rng->avail, len);
/* if avail < BSIZE, the first avail bytes have already been used. */
- memcpy(dest, rng->Xj + (BSIZE - rng->avail), num);
+ memcpy(output, rng->Xj + (BSIZE - rng->avail), num);
rng->avail -= num;
len -= num;
- dest += num;
+ output += num;
}
PR_Unlock(rng->lock);
/* --- UNLOCKED --- */