mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 02:20:06 +01:00
aux-intern: add explicit cast for strchr()
`addr` is always reallocated in this branch, so it is safe to cast the result of strchr to char* here to silence the const-qualifier warning.
This commit is contained in:
parent
9e70f31c8c
commit
8e72e6b4fb
1 changed files with 1 additions and 1 deletions
|
|
@ -825,7 +825,7 @@ nm_dns_uri_parse(int addr_family, const char *str, NMDnsServer *dns, GError **er
|
|||
addr = nm_strndup_a(100, addr_port, end - addr_port, &addr_heap);
|
||||
|
||||
/* IPv6 link-local scope-id */
|
||||
perc = strchr(addr, '%');
|
||||
perc = (char *) strchr(addr, '%');
|
||||
if (perc) {
|
||||
*perc = '\0';
|
||||
if (g_strlcpy(dns->interface, perc + 1, sizeof(dns->interface))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue