Project

General

Profile

Actions

Bug #3022

open

sys/dev/netif/ath/ath/if_ath.c:2142: strange bitmask ?

Added by dcb almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
04/11/2017
Due date:
% Done:

0%

Estimated time:

Description

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]++;

No data to display

Actions

Also available in: Atom PDF