projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8476a4
)
bcachefs: Fix a valgrind conditional jump
author
Kent Overstreet
<kent.overstreet@gmail.com>
Tue, 17 Aug 2021 19:03:53 +0000
(15:03 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:10 +0000
(17:09 -0400)
Valgrind was complaining about a jump depending on uninitialized memory
- we weren't, but this change makes the code less confusing for valgrind
to follow.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/varint.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/varint.c
b/fs/bcachefs/varint.c
index 6955ff5dc19ccfd6701bc93a05741716036dbaa4..e87da470c5812bae567fb3b6a25e6c4f2862d70a 100644
(file)
--- a/
fs/bcachefs/varint.c
+++ b/
fs/bcachefs/varint.c
@@
-97,7
+97,7
@@
int bch2_varint_encode_fast(u8 *out, u64 v)
int bch2_varint_decode_fast(const u8 *in, const u8 *end, u64 *out)
{
u64 v = get_unaligned_le64(in);
- unsigned bytes = ffz(
v & 255
) + 1;
+ unsigned bytes = ffz(
*in
) + 1;
if (unlikely(in + bytes > end))
return -1;