1
0
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:
Philipp Klaus Krause 2020-10-13 18:35:50 +02:00 committed by Daniel Stenberg
parent 8b1a10cdf7
commit 5168e5ad1d
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -781,7 +781,7 @@ const char *Curl_strerror(int err, char *buf, size_t buflen)
}
#else
{
char *msg = strerror(err);
const char *msg = strerror(err);
if(msg)
strncpy(buf, msg, max);
else