aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/libtest/lib517.c2
-rw-r--r--tests/libtest/lib552.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c
index 34146d20f..20fba6fbd 100644
--- a/tests/libtest/lib517.c
+++ b/tests/libtest/lib517.c
@@ -10,7 +10,7 @@
#include "test.h"
-const char *dates[]={
+static const char *dates[]={
"Sun, 06 Nov 1994 08:49:37 GMT",
"Sunday, 06-Nov-94 08:49:37 GMT",
"Sun Nov 6 08:49:37 1994",
diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c
index 1c6e23455..ab097da3e 100644
--- a/tests/libtest/lib552.c
+++ b/tests/libtest/lib552.c
@@ -106,15 +106,15 @@ int my_trace(CURL *handle, curl_infotype type,
static size_t current_offset = 0;
-char data[70000]; /* MUST be more than 64k OR MAX_INITIAL_POST_SIZE */
+static char databuf[70000]; /* MUST be more than 64k OR MAX_INITIAL_POST_SIZE */
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t amount = nmemb * size; /* Total bytes curl wants */
- size_t available = sizeof data - current_offset; /* What we have to give */
+ size_t available = sizeof(databuf) - current_offset; /* What we have to give */
size_t given = amount < available ? amount : available; /* What is given */
(void)stream;
- memcpy(ptr, data + current_offset, given);
+ memcpy(ptr, databuf + current_offset, given);
current_offset += given;
return given;
}
@@ -161,14 +161,14 @@ int test(char *URL)
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
/* setup repeated data string */
- for (i=0; i < sizeof data; ++i)
- data[i] = fill[i % sizeof fill];
+ for (i=0; i < sizeof(databuf); ++i)
+ databuf[i] = fill[i % sizeof fill];
/* Post */
curl_easy_setopt(curl, CURLOPT_POST, 1L);
/* Setup read callback */
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof data);
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof(databuf));
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* Write callback */