Commit 6112813df53ce6762f5c8de1d4382d67f9f2f769 introduced
code to occasionally invert the valuerand64().  However the code 
mistakenly zeroed the value instead by xoring it with itself.

Signed-off-by: Andy Honig <[email protected]>

---
 random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/random.c b/random.c
index a12ba42..b148714 100644
--- a/random.c
+++ b/random.c
@@ -214,7 +214,7 @@ u64 rand64(void)
        }
 
        if (rand_bool())
-               r ^= r;
+               r = ~r;
 
        /* increase distribution in MSB */
        if ((rand() % 10)) {
-- 
1.8.3

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to