aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib543.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib543.c')
-rw-r--r--tests/libtest/lib543.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/libtest/lib543.c b/tests/libtest/lib543.c
index 6d2532d12..957839f7a 100644
--- a/tests/libtest/lib543.c
+++ b/tests/libtest/lib543.c
@@ -27,15 +27,18 @@
int test(char *URL)
{
- unsigned char a[] = {0x9c, 0x26, 0x4b, 0x3d, 0x49, 0x4, 0xa1, 0x1,
- 0xe0, 0xd8, 0x7c, 0x20, 0xb7, 0xef, 0x53, 0x29, 0xfa,
- 0x1d, 0x57, 0xe1};
+ static const unsigned char a[] = {
+ 0x9c, 0x26, 0x4b, 0x3d, 0x49, 0x4, 0xa1, 0x1,
+ 0xe0, 0xd8, 0x7c, 0x20, 0xb7, 0xef, 0x53, 0x29, 0xfa,
+ 0x1d, 0x57, 0xe1};
CURL *easy;
int asize;
char *s;
+ CURLcode res = CURLE_OK;
(void)URL;
+ global_init(CURL_GLOBAL_ALL);
easy = curl_easy_init();
if(!easy) {
fprintf(stderr, "curl_easy_init() failed\n");
@@ -44,7 +47,7 @@ int test(char *URL)
asize = (int)sizeof(a);
- s = curl_easy_escape(easy, (char *)a, asize);
+ s = curl_easy_escape(easy, (const char *)a, asize);
if(s)
printf("%s\n", s);
@@ -53,6 +56,7 @@ int test(char *URL)
curl_free(s);
curl_easy_cleanup(easy);
+ curl_global_cleanup();
return 0;
}