[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210802203020.9679-1-fmdefrancesco@gmail.com>
Date: Mon, 2 Aug 2021 22:30:20 +0200
From: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Larry Finger <Larry.Finger@...inger.net>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>
Cc: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Subject: [PATCH v2] staging: r8188eu: core: Change the length of an array
IPX_NODE_LEN == 6, while addr.f1 should only have 4 elements.
Replace IPX_NODE_LEN with 4. In the while, remove the excess spaces
before the fields of the union.
Fixes: 56febcc2595e ("staging: r8188eu: Fix different base types in assignments and parameters")
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
---
Changes in v2:
Add a "Fixes:" tag.
drivers/staging/r8188eu/core/rtw_br_ext.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c
index 8f434768dd15..c585224080c6 100644
--- a/drivers/staging/r8188eu/core/rtw_br_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_br_ext.c
@@ -137,9 +137,9 @@ static inline void __nat25_generate_ipx_network_addr_with_node(unsigned char *ne
__be32 *ipxNetAddr, unsigned char *ipxNodeAddr)
{
union {
- unsigned int f0;
- unsigned char f1[IPX_NODE_LEN];
- } addr;
+ unsigned int f0;
+ unsigned char f1[4];
+ } addr;
memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
--
2.32.0
Powered by blists - more mailing lists