carl9170: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
PATCH 1/1 carl9170: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for flexible-array members in unions.
--- drivers/net/wireless/ath/carl9170/wlan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/carl9170/wlan.h +1 -1
@@ -271,7 +271,7 @@ struct ar9170_tx_frame {union {struct ieee80211_hdr i3e; -u8 payload[0 ]; + DECLARE_FLEX_ARRAY(u8, payload); } data; } __packed;
Signature · 1 line
2.34.1
Quoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
Signature · 1 line
Kees Cook
Quoted 5 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.
Quoted 8 lines
This helper allows for flexible-array members in unions.
Patch applied to ath-next branch of ath.git, thanks.
9ec6e20776ab carl9170: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/YzIdWc8QSdZFHBYg@work/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches