Date: Fri, 6 Aug 2021 00:49:27 GMT From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b00de27cfc8d - stable/12 - Fortuna: trivial static variable cleanup Message-ID: <202108060049.1760nRaP041541@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=b00de27cfc8da96f22c6ad3353e492e947001fa3 commit b00de27cfc8da96f22c6ad3353e492e947001fa3 Author: Conrad Meyer <cem@FreeBSD.org> AuthorDate: 2018-10-20 20:15:06 +0000 Commit: David E. O'Brien <obrien@FreeBSD.org> CommitDate: 2021-08-06 00:28:01 +0000 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 (cherry picked from commit 494dda455cd1dad0277a35e292735243f92ec10a) --- sys/dev/random/fortuna.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/random/fortuna.c b/sys/dev/random/fortuna.c index 7b4193b528d4..6382d47b1415 100644 --- a/sys/dev/random/fortuna.c +++ b/sys/dev/random/fortuna.c @@ -333,7 +333,7 @@ random_fortuna_genblocks(uint8_t *buf, u_int blockcount) 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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108060049.1760nRaP041541>