[PATCH 10/23] examples/ip_pipeline: fix shadow variable

Stephen Hemminger stephen at networkplumber.org
Tue Apr 7 05:49:36 CEST 2026


The variable p was used for both pipeline and parameters.
Rename first instance.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 examples/ip_pipeline/cli.c       | 9 ++++-----
 examples/ip_pipeline/meson.build | 1 -
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c
index 766fc8e46e..935c9b39d5 100644
--- a/examples/ip_pipeline/cli.c
+++ b/examples/ip_pipeline/cli.c
@@ -4721,7 +4721,7 @@ table_rule_show(const char *pipeline_name,
 	uint32_t table_id,
 	const char *file_name)
 {
-	struct pipeline *p;
+	struct pipeline *pipeline;
 	struct table *table;
 	struct table_rule *rule;
 	FILE *f = NULL;
@@ -4732,12 +4732,11 @@ table_rule_show(const char *pipeline_name,
 		(file_name == NULL))
 		return -1;
 
-	p = pipeline_find(pipeline_name);
-	if ((p == NULL) ||
-		(table_id >= p->n_tables))
+	pipeline = pipeline_find(pipeline_name);
+	if (pipeline == NULL || table_id >= pipeline->n_tables)
 		return -1;
 
-	table = &p->table[table_id];
+	table = &pipeline->table[table_id];
 
 	/* Open file. */
 	f = fopen(file_name, "w");
diff --git a/examples/ip_pipeline/meson.build b/examples/ip_pipeline/meson.build
index c5cda980f9..68049157e4 100644
--- a/examples/ip_pipeline/meson.build
+++ b/examples/ip_pipeline/meson.build
@@ -28,4 +28,3 @@ sources = files(
         'thread.c',
         'tmgr.c',
 )
-cflags += no_shadow_cflag
-- 
2.53.0



More information about the dev mailing list