Skip to contentSkip to conversation

net/zxdh: replace zero length array

PATCH Applied Stephen Hemminger 1 participant 2 messages Aug 21, 2025 – Aug 26, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/zxdh: replace zero length array

Zero length arrays are a GNU C extension, the better way to get the same effect is to use ISO C99 flexible array.

---
 drivers/net/zxdh/zxdh_np.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/zxdh/zxdh_np.h +1 -1
index 1b8f17474d..31cd844ceb 100644
@@ -1058,7 +1058,7 @@ typedef struct zxdh_acl_etcamid_cfg_t {
 typedef struct zxdh_acl_key_info_t {
 	uint32_t handle;
 	uint32_t pri;
-	uint8_t   key[0];
+	uint8_t key[];
 } ZXDH_ACL_KEY_INFO_T;
 
 typedef uint32_t (*ZXDH_ACL_TBL_AS_DDR_WR_FUN)(uint32_t dev_id, uint32_t tbl_type,
Signature · 1 line
2.47.2
author Applied
#1 lore raw
Quoted 4 lines · On Thu, 21 Aug 2025 08:25:35 -0700 Stephen Hemminger…

Zero length arrays are a GNU C extension, the better way to get the same effect is to use ISO C99 flexible array.

Queued to next-net