Skip to content

Commit

Permalink
airo: Fix integer overflow warning
Browse files Browse the repository at this point in the history
On BigEndian gcc complains:

drivers/net/wireless/airo.c: In function ‘sniffing_mode’:
drivers/net/wireless/airo.c:4809: warning: integer overflow in expression

Fix this by doing the bitwise AND on the host-endian value.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Michael Buesch authored and John W. Linville committed Dec 4, 2009
1 parent a5186e9 commit 1f351e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -4806,7 +4806,7 @@ static int airo_config_commit(struct net_device *dev,

static inline int sniffing_mode(struct airo_info *ai)
{
return le16_to_cpu(ai->config.rmode & RXMODE_MASK) >=
return (le16_to_cpu(ai->config.rmode) & le16_to_cpu(RXMODE_MASK)) >=
le16_to_cpu(RXMODE_RFMON);
}

Expand Down

0 comments on commit 1f351e3

Please sign in to comment.