mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 07:58:00 +02: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
d2d9fa4160
commit
b74b6bf867
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