]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
strerror: use 'const' as the string should never be modified
authorPhilipp Klaus Krause <pkk@spth.de>
Tue, 13 Oct 2020 16:35:50 +0000 (18:35 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 15 Oct 2020 13:43:32 +0000 (15:43 +0200)
Closes #6068

lib/strerror.c

index b5808df2d12a430ebf978ffff192c26d39b9bf84..9082eac6a5365d1291e852ae5b2d00fe2185fd3e 100644 (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