From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Larry Finger <Larry.Finger@lwfinger.net>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Subject: [PATCH v2] staging: r8188eu: core: Change the length of an array
Date: Mon, 2 Aug 2021 22:30:20 +0200 [thread overview]
Message-ID: <20210802203020.9679-1-fmdefrancesco@gmail.com> (raw)
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
next reply other threads:[~2021-08-02 20:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-02 20:30 Fabio M. De Francesco [this message]
2021-08-03 6:14 ` [PATCH v2] staging: r8188eu: core: Change the length of an array 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210802203020.9679-1-fmdefrancesco@gmail.com \
--to=fmdefrancesco@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox