Hi,
Two typos in comments & explicit return at end of function returning void.
I am a little confused by mixture of memset and explicit_bzero in rnd.c for
clearing data. I understand explicit_bzero is meant for clearing sensitive
data. Would it be harmful for use only explicit_bzero here?
- Michael
Index: src/sys/dev/rnd.c
===================================================================
RCS file: /cvs/src/sys/dev/rnd.c,v
retrieving revision 1.190
diff -u -p -u -r1.190 rnd.c
--- src/sys/dev/rnd.c 18 Oct 2016 13:40:59 -0000 1.190
+++ src/sys/dev/rnd.c 8 Dec 2016 02:22:59 -0000
@@ -186,7 +186,7 @@
* distance from evenly spaced; except for the last tap, which is 1 to
* get the twisting happening as fast as possible.
*
- * The reultant polynomial is:
+ * The resultant polynomial is:
* 2^POOLWORDS + 2^POOL_TAP1 + 2^POOL_TAP2 + 2^POOL_TAP3 + 2^POOL_TAP4 + 1
*/
#define POOLWORDS 2048
@@ -363,7 +363,7 @@ add_entropy_words(const u_int32_t *buf,
}
/*
- * Pulls entropy out of the queue and throws merges it into the pool
+ * Pulls entropy out of the queue and merges it into the pool
* with the CRC.
*/
/* ARGSUSED */
@@ -631,7 +631,6 @@ _rs_random_u32(u_int32_t *val)
memcpy(val, rs_buf + RSBUFSZ - rs_have, sizeof(*val));
memset(rs_buf + RSBUFSZ - rs_have, 0, sizeof(*val));
rs_have -= sizeof(*val);
- return;
}
/* Return one word of randomness from a ChaCha20 generator */