summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Straube <straube.linux@gmail.com>2018-12-18 19:34:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-19 08:32:33 +0100
commit79ebad324b487729d4aabddcb81e80c94b6f11c3 (patch)
treeb64dbce98cb90ea51e083c0b201c8f982d2ffec9
parentb7d54304d92facd3df766d1a1aa283379d719d96 (diff)
staging: rtl8188eu: simplify null array initializations
Simplfy initialization of null arrays to improve readability and save some lines. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_mlme_ext.c4
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_xmit.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index d3d211d8eeee..2a42f80d1970 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -17,7 +17,7 @@
#include <mlme_osdep.h>
#include <recv_osdep.h>
-static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
+static u8 null_addr[ETH_ALEN] = {};
/**************************************************
OUI definitions for the vendor specific IE
@@ -5207,7 +5207,7 @@ u8 setkey_hdl(struct adapter *padapter, u8 *pbuf)
struct setkey_parm *pparm = (struct setkey_parm *)pbuf;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
- u8 null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+ u8 null_sta[ETH_ALEN] = {};
/* main tx key for wep. */
if (pparm->set_tx)
diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c
index 14e3f59b9009..3b1ccd138c3f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_xmit.c
+++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c
@@ -592,7 +592,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
struct pkt_attrib *pattrib = &pxmitframe->attrib;
struct security_priv *psecuritypriv = &padapter->securitypriv;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
- u8 priority[4] = {0x0, 0x0, 0x0, 0x0};
+ u8 priority[4] = {};
u8 hw_hdr_offset = 0;
if (pattrib->psta)
@@ -605,9 +605,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
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 + hw_hdr_offset;