[DragonFlyBSD - Bug #3022] sys/dev/netif/ath/ath/if_ath.c:2142: strange bitmask ?

sigttou bugtracker-admin at leaf.dragonflybsd.org
Wed Oct 7 21:57:19 PDT 2026


Issue #3022 has been updated by sigttou.

File 0001-ath-use-single-bit-sync-interrupt-mask.patch added

patch attached.

----------------------------------------
Bug #3022: sys/dev/netif/ath/ath/if_ath.c:2142: strange bitmask ?
http://bugs.dragonflybsd.org/issues/3022#change-14815

* Author: dcb
* Status: New
* Priority: Normal
* Target version: 6.4
* Start date: 2017-04-11
----------------------------------------
sys/dev/netif/ath/ath/if_ath.c:2142]: (error) Signed integer overflow for expression 'i<<i'.

Source code is

        for (i = 0; i < 32; i++)
            if (ah->ah_syncstate & (i << i))
                sc->sc_intr_stats.sync_intr[i]++;

Maybe better code

        for (i = 0; i < 32; i++)
            if (ah->ah_syncstate & (1 << i))
                sc->sc_intr_stats.sync_intr[i]++;


---Files--------------------------------
0001-ath-use-single-bit-sync-interrupt-mask.patch (869 Bytes)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list