mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Explicit integer promotion for bit shift operations
Explicitly promote variables to correct type. Undefined behavior is reported because length of int is not well defined by C standard. Issue #4883 Signed-off-by: Gvozden Neskovic <neskovic@gmail.com>
This commit is contained in:
committed by
Brian Behlendorf
parent
031d7c2fe6
commit
4ca9c1de12
@@ -600,7 +600,7 @@ spa_tx_assign_add_nsecs(spa_t *spa, uint64_t nsecs)
|
||||
spa_stats_history_t *ssh = &spa->spa_stats.tx_assign_histogram;
|
||||
uint64_t idx = 0;
|
||||
|
||||
while (((1 << idx) < nsecs) && (idx < ssh->size - 1))
|
||||
while (((1ULL << idx) < nsecs) && (idx < ssh->size - 1))
|
||||
idx++;
|
||||
|
||||
atomic_inc_64(&((kstat_named_t *)ssh->private)[idx].value.ui64);
|
||||
|
||||
Reference in New Issue
Block a user