summaryrefslogtreecommitdiff
path: root/tests/libtest/lib1555.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-03-05 13:51:30 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-03-05 14:38:25 +0100
commita4cc978906ef14a5ae5a251de89fce784304898b (patch)
tree80ea5b18467e5d8b1e3f33a91875930fc032e4c2 /tests/libtest/lib1555.c
parent1ed9e747029b963b641d5cd0389e087c03ee3cb5 (diff)
downloadgnurl-a4cc978906ef14a5ae5a251de89fce784304898b.tar.gz
gnurl-a4cc978906ef14a5ae5a251de89fce784304898b.tar.bz2
gnurl-a4cc978906ef14a5ae5a251de89fce784304898b.zip
tests: fix multiple may be used uninitialized warnings
Diffstat (limited to 'tests/libtest/lib1555.c')
-rw-r--r--tests/libtest/lib1555.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/libtest/lib1555.c b/tests/libtest/lib1555.c
index e4f2255ac..f7193b5be 100644
--- a/tests/libtest/lib1555.c
+++ b/tests/libtest/lib1555.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -36,14 +36,16 @@ static int progressCallback(void *arg,
double ulnow)
{
CURLcode res = 0;
+ char buffer[256];
+ size_t n = 0;
(void)arg;
(void)dltotal;
(void)dlnow;
(void)ultotal;
(void)ulnow;
- res = curl_easy_recv(curl, NULL, 0, NULL);
+ res = curl_easy_recv(curl, buffer, 256, &n);
printf("curl_easy_recv returned %d\n", res);
- res = curl_easy_send(curl, NULL, 0, NULL);
+ res = curl_easy_send(curl, buffer, n, &n);
printf("curl_easy_send returned %d\n", res);
return 1;