From: Philipp Klaus Krause Date: Tue, 13 Oct 2020 16:35:50 +0000 (+0200) Subject: strerror: use 'const' as the string should never be modified X-Git-Tag: curl-7_74_0~162 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5168e5ad1dbc2a3398a2c3c6c7cba2779a4e4cee;p=thirdparty%2Fcurl.git strerror: use 'const' as the string should never be modified Closes #6068 --- diff --git a/lib/strerror.c b/lib/strerror.c index b5808df2d1..9082eac6a5 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -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