Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: use shorter array initializations

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>
Link: https://lore.kernel.org/r/20200919085032.32453-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Michael Straube and committed by
Greg Kroah-Hartman
4ed7f052 0e934ce2

+3 -4
+3 -4
drivers/staging/rtl8712/rtl871x_xmit.c
··· 352 352 struct pkt_attrib *pattrib = &pxmitframe->attrib; 353 353 struct security_priv *psecpriv = &padapter->securitypriv; 354 354 struct xmit_priv *pxmitpriv = &padapter->xmitpriv; 355 - u8 priority[4] = {0x0, 0x0, 0x0, 0x0}; 355 + u8 priority[4] = {}; 356 356 bool bmcst = is_multicast_ether_addr(pattrib->ra); 357 357 358 358 if (pattrib->psta) ··· 363 363 if (pattrib->encrypt == _TKIP_) { 364 364 /*encode mic code*/ 365 365 if (stainfo) { 366 - u8 null_key[16] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 367 - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 368 - 0x0, 0x0}; 366 + u8 null_key[16] = {}; 367 + 369 368 pframe = pxmitframe->buf_addr + TXDESC_OFFSET; 370 369 if (bmcst) { 371 370 if (!memcmp(psecpriv->XGrptxmickey