summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rayctl.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-11-26 15:41:29 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-26 15:41:29 -0500
commitb4c0e72e80e2e04b462ea05cc5a001807d7feed6 (patch)
treee0533e1e18ab68729063f7419ed056820dea443f /drivers/net/wireless/rayctl.h
parentf47398409c140a48dd40faf75a18f7c93504a22e (diff)
downloadlinux-b4c0e72e80e2e04b462ea05cc5a001807d7feed6.tar.bz2
ray_cs: Fix array bounds warnings.
rx_msg is defined to have a 1 entry array at the end, so gcc warns: drivers/net/wireless/ray_cs.c: In function ‘rx_authenticate’: drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2436:3: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2439:15: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2452:16: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2453:18: warning: array subscript is above array bounds [-Warray-bounds] drivers/net/wireless/ray_cs.c:2453:32: warning: array subscript is above array bounds [-Warray-bounds] Use a zero length array and rename to "ray_rx_msg" to make sure we hit all of the necessary cases. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rayctl.h')
-rw-r--r--drivers/net/wireless/rayctl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rayctl.h b/drivers/net/wireless/rayctl.h
index d7646f299bd3..3c3b98b152c3 100644
--- a/drivers/net/wireless/rayctl.h
+++ b/drivers/net/wireless/rayctl.h
@@ -566,9 +566,9 @@ struct phy_header {
UCHAR hdr_3;
UCHAR hdr_4;
};
-struct rx_msg {
+struct ray_rx_msg {
struct mac_header mac;
- UCHAR var[1];
+ UCHAR var[0];
};
struct tx_msg {