From b2b5cccf39e76a5b2871f6c8e2553a6a3d3e9b4e Mon Sep 17 00:00:00 2001 From: str4d Date: Sat, 26 Sep 2020 00:56:20 +0100 Subject: [PATCH] test: Fix LFSR period in comments Verified using a Python implementation. Co-authored-by: Daira Hopwood --- src/bench/lockedpool.cpp | 2 +- src/test/allocator_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bench/lockedpool.cpp b/src/bench/lockedpool.cpp index 40b5af73d..4226d6b82 100644 --- a/src/bench/lockedpool.cpp +++ b/src/bench/lockedpool.cpp @@ -35,7 +35,7 @@ static void LockedPool(benchmark::State& state) bool lsb = s & 1; s >>= 1; if (lsb) - s ^= 0xf00f00f0; // LFSR period 0xf7ffffe0 + s ^= 0xf00f00f0; // LFSR period 0xf7ffffe1 } } for (void *ptr: addr) diff --git a/src/test/allocator_tests.cpp b/src/test/allocator_tests.cpp index d2784b131..68e987e42 100644 --- a/src/test/allocator_tests.cpp +++ b/src/test/allocator_tests.cpp @@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(arena_tests) bool lsb = s & 1; s >>= 1; if (lsb) - s ^= 0xf00f00f0; // LFSR period 0xf7ffffe0 + s ^= 0xf00f00f0; // LFSR period 0xf7ffffe1 } for (void *ptr: addr) b.free(ptr);