From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, lorian.c.schilhabel@googlemail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 2/2] staging: rtl8712: use shorter array initializations
Date: Sat, 19 Sep 2020 10:50:32 +0200 [thread overview]
Message-ID: <20200919085032.32453-2-straube.linux@gmail.com> (raw)
In-Reply-To: <20200919085032.32453-1-straube.linux@gmail.com>
Use empty brace syntax to initialize zero valued arrays.
Simplifies and shortens the code a little bit.
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/rtl8712/rtl871x_xmit.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c
index 7093903b3af1..fd99782a400a 100644
--- a/drivers/staging/rtl8712/rtl871x_xmit.c
+++ b/drivers/staging/rtl8712/rtl871x_xmit.c
@@ -352,7 +352,7 @@ static int xmitframe_addmic(struct _adapter *padapter,
struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct security_priv *psecpriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
- u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
+ u8 priority[4] = {};
bool bmcst = is_multicast_ether_addr(pattrib->ra);
if (pattrib->psta)
@@ -363,9 +363,8 @@ static int xmitframe_addmic(struct _adapter *padapter,
if (pattrib->encrypt == _TKIP_) {
/*encode mic code*/
if (stainfo) {
- u8 null_key[16] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
- 0x0, 0x0};
+ u8 null_key[16] = {};
+
pframe = pxmitframe->buf_addr + TXDESC_OFFSET;
if (bmcst) {
if (!memcmp(psecpriv->XGrptxmickey
--
2.28.0
prev parent reply other threads:[~2020-09-19 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 8:50 [PATCH 1/2] staging: rtl8712: clean up comparsions to NULL Michael Straube
2020-09-19 8:50 ` Michael Straube [this message]
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=20200919085032.32453-2-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorian.c.schilhabel@googlemail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.