public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mesh: don't incorrectly use const
@ 2026-02-08 11:45 Rudi Heitbaum
  2026-02-09 12:39 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Rudi Heitbaum @ 2026-02-08 11:45 UTC (permalink / raw)
  To: johannes; +Cc: rudi, linux-wireless

*name is used by strchr and subsequently modified replacing "="
with '\0'. Remove incorrect and unnecessary const. Passed in argv[]
is editable, and is being modified in the function.

Fixes:
mesh.c: In function 'set_interface_meshparam':
mesh.c:327:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  327 |                 value = strchr(name, '=');
      |                       ^

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
 mesh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesh.c b/mesh.c
index 40e5e5e..f116ae7 100644
--- a/mesh.c
+++ b/mesh.c
@@ -317,7 +317,7 @@ static int set_interface_meshparam(struct nl80211_state *state,
 	}
 
 	while (argc) {
-		const char *name;
+		char *name;
 		char *value;
 		_any any;
 
-- 
2.51.0


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

end of thread, other threads:[~2026-02-09 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-08 11:45 [PATCH] mesh: don't incorrectly use const Rudi Heitbaum
2026-02-09 12:39 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox