dlmalloc: fix notice for ambiguous expression with both >> and & (#21539)

This commit is contained in:
Delyan Angelov 2024-05-21 01:56:54 +03:00 committed by GitHub
parent f3624d58cf
commit 0963069b98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -460,7 +460,7 @@ fn (dl &Dlmalloc) compute_tree_index(size usize) u32 {
return dlmalloc.n_tree_bins - 1 return dlmalloc.n_tree_bins - 1
} else { } else {
k := sizeof(usize) * 8 - 1 - usize_leading_zeros(x) k := sizeof(usize) * 8 - 1 - usize_leading_zeros(x)
return u32((k << 1) + (size >> (k + dlmalloc.tree_bin_shift - 1) & 1)) return u32((k << 1) + ((size >> (k + dlmalloc.tree_bin_shift - 1)) & 1))
} }
} }