svn commit: r339481 - head/sys/dev/random

Conrad Meyer cem at FreeBSD.org
Sat Oct 20 20:15:07 UTC 2018


Author: cem
Date: Sat Oct 20 20:15:06 2018
New Revision: 339481
URL: https://svnweb.freebsd.org/changeset/base/339481

Log:
  Fortuna: trivial static variable cleanup
  
  Remove unnecessary use of function-local static variable.  32 bytes is
  small enough to live on the stack.
  
  Reviewed by:	delphij, markm
  Approved by:	secteam (delphij)
  Sponsored by:	Dell EMC Isilon
  Differential Revision:	https://reviews.freebsd.org/D16937

Modified:
  head/sys/dev/random/fortuna.c

Modified: head/sys/dev/random/fortuna.c
==============================================================================
--- head/sys/dev/random/fortuna.c	Sat Oct 20 20:12:57 2018	(r339480)
+++ head/sys/dev/random/fortuna.c	Sat Oct 20 20:15:06 2018	(r339481)
@@ -333,7 +333,7 @@ random_fortuna_genblocks(uint8_t *buf, u_int blockcoun
 static __inline void
 random_fortuna_genrandom(uint8_t *buf, u_int bytecount)
 {
-	static uint8_t temp[RANDOM_BLOCKSIZE*(RANDOM_KEYS_PER_BLOCK)];
+	uint8_t temp[RANDOM_BLOCKSIZE * RANDOM_KEYS_PER_BLOCK];
 	u_int blockcount;
 
 	RANDOM_RESEED_ASSERT_LOCK_OWNED();


More information about the svn-src-all mailing list