public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2] staging: r8188eu: core: Change the length of an array
@ 2021-08-02 20:30 Fabio M. De Francesco
  2021-08-03  6:14 ` Dan Carpenter
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio M. De Francesco @ 2021-08-02 20:30 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger, linux-staging, linux-kernel,
	Dan Carpenter
  Cc: Fabio M. De Francesco

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@oracle.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-05 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-02 20:30 [PATCH v2] staging: r8188eu: core: Change the length of an array Fabio M. De Francesco
2021-08-03  6:14 ` Dan Carpenter
2021-08-03  6:20   ` Greg Kroah-Hartman
2021-08-03 13:28     ` Dan Carpenter
2021-08-05 10:44     ` Greg Kroah-Hartman
2021-08-03 13:26   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox