Micro optimize: C standard guarantees that right shift for unsigned value

fills left bits with zero, and we have exact 32bit unsigned value
(uint32_t), so there is no reason to add "& 0x7fffffff" here.

MFC after:      1 week
This commit is contained in:
Andrey A. Chernov 2016-05-29 16:39:28 +00:00
parent a25e1dd4df
commit b8ac3f201d

View File

@ -430,7 +430,7 @@ random(void)
*/
f = fptr; r = rptr;
*f += *r;
i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */
i = *f >> 1; /* chucking least random bit */
if (++f >= end_ptr) {
f = state;
++r;