mesh: don't incorrectly use const
PATCH 1/1 mesh: don't incorrectly use const
*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 <[email protected]>
--- mesh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mesh.c +1 -1
@@ -317,7 +317,7 @@ static int set_interface_meshparam(struct nl80211_state *state, }while (argc) { -const char *name; +char *name;char *value;_any any;
Signature · 1 line
2.51.0
mesh.c
Quoted 3 lines · Rudi Heitbaum
mesh.c +0
-0
What's this for? Maybe 'iw'? Please use (also) that for subject prefix if so.
johannes