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:
parent
a25e1dd4df
commit
b8ac3f201d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user