mirror of
https://github.com/moparisthebest/curl
synced 2025-01-10 21:48:10 -05:00
strerror: use 'const' as the string should never be modified
Closes #6068
This commit is contained in:
parent
8b1a10cdf7
commit
5168e5ad1d
@ -781,7 +781,7 @@ const char *Curl_strerror(int err, char *buf, size_t buflen)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
char *msg = strerror(err);
|
const char *msg = strerror(err);
|
||||||
if(msg)
|
if(msg)
|
||||||
strncpy(buf, msg, max);
|
strncpy(buf, msg, max);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user