Skip to content

Commit 9ec6e20

Browse files
GustavoARSilvakvalo
authored andcommitted
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. Link: KSPP/linux#193 Link: KSPP/linux#215 Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/YzIdWc8QSdZFHBYg@work
1 parent 00d942e commit 9ec6e20

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/ath/carl9170

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/carl9170/wlan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ struct ar9170_tx_frame {
271271

272272
union {
273273
struct ieee80211_hdr i3e;
274-
u8 payload[0];
274+
DECLARE_FLEX_ARRAY(u8, payload);
275275
} data;
276276
} __packed;
277277

0 commit comments

Comments
 (0)