From fdba21ffd6ea490401fd37f4230db37222cbc57a Mon Sep 17 00:00:00 2001 From: costan Date: Sun, 6 Jan 2019 13:06:38 -0800 Subject: [PATCH] Fix typo in two argument names in stubs. The stubs are only used in the open source version, so it wasn't caught in internal tests. --- snappy-stubs-internal.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h index 4ea26a4..c70a84a 100644 --- a/snappy-stubs-internal.h +++ b/snappy-stubs-internal.h @@ -393,14 +393,14 @@ inline int Bits::Log2FloorNonZero(uint32 n) { // (31 ^ x) is equivalent to (31 - x) for x in [0, 31]. An easy proof // represents subtraction in base 2 and observes that there's no carry. // - // GCC and Clang reprenset __builtin_clz on x86 as 31 ^ _bit_scan_reverse(x). + // GCC and Clang represent __builtin_clz on x86 as 31 ^ _bit_scan_reverse(x). // Using "31 ^" here instead of "31 -" allows the optimizer to strip the // function body down to _bit_scan_reverse(x). - return 31 ^ __builtin_clz(arg); + return 31 ^ __builtin_clz(n); } inline int Bits::Log2Floor(uint32 n) { - return (n == 0) ? -1 : Bits::Log2FloorNonZero(arg); + return (n == 0) ? -1 : Bits::Log2FloorNonZero(n); } inline int Bits::FindLSBSetNonZero(uint32 n) {