DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] hash: replace zero length array
@ 2025-08-20 21:19 Stephen Hemminger
  2025-08-21  0:42 ` fengchengwen
  0 siblings, 1 reply; 3+ 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] 3+ 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
  2025-08-21  1:43   ` Morten Brørup
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

* RE: [PATCH] hash: replace zero length array
  2025-08-21  0:42 ` fengchengwen
@ 2025-08-21  1:43   ` Morten Brørup
  0 siblings, 0 replies; 3+ messages in thread
From: Morten Brørup @ 2025-08-21  1:43 UTC (permalink / raw)
  To: Stephen Hemminger, dev
  Cc: Yipeng Wang, Sameh Gobriel, Bruce Richardson, Vladimir Medvedkin,
	fengchengwen

> From: fengchengwen [mailto:fengchengwen@huawei.com]
> Sent: Thursday, 21 August 2025 02.43
> 
> 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 */

Acked-by: Morten Brørup <mb@smartsharesystems.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-21  1:43 UTC | newest]

Thread overview: 3+ 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
2025-08-21  1:43   ` Morten Brørup

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).