Commit 098238e8 authored by Tian Tao's avatar Tian Tao Committed by Kalle Valo

wilc1000: use flexible-array member instead of zero-length array

Use flexible-array member introduced in C99 instead of zero-length
array. Most of zero-length array was already taken care in previous
patch [1].

[1]. https://patchwork.kernel.org/patch/11394197/Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1608881703-37060-1-git-send-email-tiantao6@hisilicon.com
parent e862a3e4
...@@ -44,20 +44,20 @@ struct wilc_drv_handler { ...@@ -44,20 +44,20 @@ struct wilc_drv_handler {
struct wilc_wep_key { struct wilc_wep_key {
u8 index; u8 index;
u8 key_len; u8 key_len;
u8 key[0]; u8 key[];
} __packed; } __packed;
struct wilc_sta_wpa_ptk { struct wilc_sta_wpa_ptk {
u8 mac_addr[ETH_ALEN]; u8 mac_addr[ETH_ALEN];
u8 key_len; u8 key_len;
u8 key[0]; u8 key[];
} __packed; } __packed;
struct wilc_ap_wpa_ptk { struct wilc_ap_wpa_ptk {
u8 mac_addr[ETH_ALEN]; u8 mac_addr[ETH_ALEN];
u8 index; u8 index;
u8 key_len; u8 key_len;
u8 key[0]; u8 key[];
} __packed; } __packed;
struct wilc_gtk_key { struct wilc_gtk_key {
...@@ -65,7 +65,7 @@ struct wilc_gtk_key { ...@@ -65,7 +65,7 @@ struct wilc_gtk_key {
u8 rsc[8]; u8 rsc[8];
u8 index; u8 index;
u8 key_len; u8 key_len;
u8 key[0]; u8 key[];
} __packed; } __packed;
struct wilc_op_mode { struct wilc_op_mode {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment