[v2,04/10] pipeline: replace zero length array with flex array

Message ID 20231117040432.131737-5-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series replace zero length arrays |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Nov. 17, 2023, 4:03 a.m. UTC
  Zero length arrays are GNU extension. Replace with
standard flex array.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/pipeline/rte_swx_pipeline_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tyler Retzlaff Nov. 17, 2023, 4:19 a.m. UTC | #1
On Thu, Nov 16, 2023 at 08:03:16PM -0800, Stephen Hemminger wrote:
> Zero length arrays are GNU extension. Replace with
> standard flex array.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---

Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  

Patch

diff --git a/lib/pipeline/rte_swx_pipeline_internal.h b/lib/pipeline/rte_swx_pipeline_internal.h
index a67b6e965de7..8ec12263b989 100644
--- a/lib/pipeline/rte_swx_pipeline_internal.h
+++ b/lib/pipeline/rte_swx_pipeline_internal.h
@@ -213,7 +213,7 @@  TAILQ_HEAD(rss_tailq, rss);
 
 struct rss_runtime {
 	uint32_t key_size; /* key size in bytes. */
-	uint8_t key[0]; /* key. */
+	uint8_t key[]; /* key. */
 };
 
 /*