mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
bcachefs: Fix a valgrind conditional jump
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>
This commit is contained in:
parent
c8476a4eb2
commit
8ddef4d6cc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user