From: Rudi Heitbaum <rudi@heitbaum.com>
To: johannes@sipsolutions.net
Cc: rudi@heitbaum.com, linux-wireless@vger.kernel.org
Subject: [PATCH] mesh: don't incorrectly use const
Date: Sun, 8 Feb 2026 11:45:24 +0000 [thread overview]
Message-ID: <aYh28AFauAnhkzee@c1ec8b16bbaa> (raw)
*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
next reply other threads:[~2026-02-08 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-08 11:45 Rudi Heitbaum [this message]
2026-02-09 12:39 ` [PATCH] mesh: don't incorrectly use const Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYh28AFauAnhkzee@c1ec8b16bbaa \
--to=rudi@heitbaum.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.