summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcostan <costan@google.com>2019-01-06 13:06:38 -0800
committerVictor Costan <pwnall@chromium.org>2019-01-06 13:49:33 -0800
commitfdba21ffd6ea490401fd37f4230db37222cbc57a (patch)
treed7764bfa2216217c2362989d981c94a9504f5abd
parent81d444e4e4a146fdc503ff335ddb5cf0238cce4f (diff)
downloadsnappy-git-fdba21ffd6ea490401fd37f4230db37222cbc57a.tar.gz
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.
-rw-r--r--snappy-stubs-internal.h6
1 files 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) {