DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/zxdh: replace zero length array
@ 2025-08-21 15:25 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2025-08-21 15:25 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, Junlong Wang, Lijie Shan

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/zxdh/zxdh_np.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/zxdh/zxdh_np.h b/drivers/net/zxdh/zxdh_np.h
index 1b8f17474d..31cd844ceb 100644
--- a/drivers/net/zxdh/zxdh_np.h
+++ b/drivers/net/zxdh/zxdh_np.h
@@ -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,
-- 
2.47.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-21 15:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-21 15:25 [PATCH] net/zxdh: replace zero length array Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).