OSDN Git Service

staging: rtl8188eu: simplify array initializations
authorMichael Straube <straube.linux@gmail.com>
Wed, 5 Dec 2018 18:30:51 +0000 (19:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Dec 2018 15:12:18 +0000 (16:12 +0100)
Simplfy initialization of arrays with zero only values
to improve readability and save a line.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_wlan_util.c

index fac1c1c..76c7010 100644 (file)
@@ -455,9 +455,8 @@ void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key)
 
 void clear_cam_entry(struct adapter *padapter, u8 entry)
 {
-       u8 null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-       u8 null_key[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+       u8 null_sta[ETH_ALEN] = {};
+       u8 null_key[16] = {};
 
        write_cam(padapter, entry, 0, null_sta, null_key);
 }