]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
gskit: Fix errors from Curl_strerror refactor
authorKevin Adler <kadler@us.ibm.com>
Mon, 24 Jan 2022 22:50:36 +0000 (16:50 -0600)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 16 Feb 2022 08:27:22 +0000 (09:27 +0100)
2f0bb864c1 replaced sterror with Curl_strerror, but the strerror buffer
shadows the set_buffer "buffer" parameter. To keep consistency with the
other functions that use Curl_strerror, rename the parameter.

In addition, strerror.h is needed for the definition of STRERROR_LEN.

Closes #8454

lib/vtls/gskit.c

index 223ca611014f4fc2524e71fbd083515854243806..996df5665a37c3e980e9007eedc01872fe436c9e 100644 (file)
@@ -28,6 +28,7 @@
 #include <qsoasync.h>
 #undef HAVE_SOCKETPAIR /* because the native one isn't good enough */
 #include "socketpair.h"
+#include "strerror.h"
 
 /* Some symbols are undefined/unsupported on OS400 versions < V7R1. */
 #ifndef GSK_SSL_EXTN_SERVERNAME_REQUEST
@@ -247,10 +248,10 @@ static CURLcode set_enum(struct Curl_easy *data, gsk_handle h,
 
 
 static CURLcode set_buffer(struct Curl_easy *data, gsk_handle h,
-                        GSK_BUF_ID id, const char *buffer, bool unsupported_ok)
+                        GSK_BUF_ID id, const char *buf, bool unsupported_ok)
 {
   char buffer[STRERROR_LEN];
-  int rc = gsk_attribute_set_buffer(h, id, buffer, 0);
+  int rc = gsk_attribute_set_buffer(h, id, buf, 0);
 
   switch(rc) {
   case GSK_OK: