* [PATCH] hash: replace zero length array
@ 2025-08-20 21:19 Stephen Hemminger
2025-08-21 0:42 ` fengchengwen
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2025-08-20 21:19 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Yipeng Wang, Sameh Gobriel, Bruce Richardson,
Vladimir Medvedkin
Zero-length arrays are a GNU C extension and instead use the ISO C99
flexible array member.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/hash/rte_cuckoo_hash.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
index 26a992419a..cf5cd29144 100644
--- a/lib/hash/rte_cuckoo_hash.h
+++ b/lib/hash/rte_cuckoo_hash.h
@@ -131,7 +131,7 @@ struct rte_hash_key {
RTE_ATOMIC(void *) pdata;
};
/* Variable key size */
- char key[0];
+ char key[];
};
/** Bucket structure */
--
2.47.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] hash: replace zero length array
2025-08-20 21:19 [PATCH] hash: replace zero length array Stephen Hemminger
@ 2025-08-21 0:42 ` fengchengwen
0 siblings, 0 replies; 2+ messages in thread
From: fengchengwen @ 2025-08-21 0:42 UTC (permalink / raw)
To: Stephen Hemminger, dev
Cc: Yipeng Wang, Sameh Gobriel, Bruce Richardson, Vladimir Medvedkin
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 8/21/2025 5:19 AM, Stephen Hemminger wrote:
> Zero-length arrays are a GNU C extension and instead use the ISO C99
> flexible array member.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> lib/hash/rte_cuckoo_hash.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/hash/rte_cuckoo_hash.h b/lib/hash/rte_cuckoo_hash.h
> index 26a992419a..cf5cd29144 100644
> --- a/lib/hash/rte_cuckoo_hash.h
> +++ b/lib/hash/rte_cuckoo_hash.h
> @@ -131,7 +131,7 @@ struct rte_hash_key {
> RTE_ATOMIC(void *) pdata;
> };
> /* Variable key size */
> - char key[0];
> + char key[];
> };
>
> /** Bucket structure */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-21 0:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-20 21:19 [PATCH] hash: replace zero length array Stephen Hemminger
2025-08-21 0:42 ` fengchengwen
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).