diff options
author | Patrick Monnerat <patrick@monnerat.net> | 2017-09-03 17:48:15 +0100 |
---|---|---|
committer | Patrick Monnerat <patrick@monnerat.net> | 2017-09-03 17:51:18 +0100 |
commit | 7e36b30da8ef1b69e7932e8a40c7585d8a711d71 (patch) | |
tree | cf405009b18bfe1106ba98bf712ab4d3f2b49174 /tests/libtest | |
parent | 437475901dddacdac2db7449b1a51ee078b1e48f (diff) |
mime: fix signed/unsigned conversions.
Use and generate CURL_ZERO_TERMINATED in curl tool and tests.
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/lib643.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/libtest/lib643.c b/tests/libtest/lib643.c index ea5a96740..b2698f076 100644 --- a/tests/libtest/lib643.c +++ b/tests/libtest/lib643.c @@ -113,7 +113,7 @@ static int once(char *URL, bool oldstyle) /* Fill in the file upload part */ if(oldstyle) { - res = curl_mime_name(part, "sendfile", -1); + res = curl_mime_name(part, "sendfile", CURL_ZERO_TERMINATED); if(!res) res = curl_mime_data_cb(part, datasize, read_callback, NULL, NULL, &pooh); @@ -122,7 +122,7 @@ static int once(char *URL, bool oldstyle) } else { /* new style */ - res = curl_mime_name(part, "sendfile alternative", -1); + res = curl_mime_name(part, "sendfile alternative", CURL_ZERO_TERMINATED); if(!res) res = curl_mime_data_cb(part, datasize, read_callback, NULL, NULL, &pooh); @@ -151,7 +151,7 @@ static int once(char *URL, bool oldstyle) return TEST_ERR_MAJOR_BAD; } /* Fill in the file upload part */ - res = curl_mime_name(part, "callbackdata", -1); + res = curl_mime_name(part, "callbackdata", CURL_ZERO_TERMINATED); if(!res) res = curl_mime_data_cb(part, datasize, read_callback, NULL, NULL, &pooh2); @@ -169,7 +169,7 @@ static int once(char *URL, bool oldstyle) } /* Fill in the filename field */ - res = curl_mime_name(part, "filename", -1); + res = curl_mime_name(part, "filename", CURL_ZERO_TERMINATED); if(!res) res = curl_mime_data(part, #ifdef CURL_DOES_CONVERSIONS @@ -179,7 +179,7 @@ static int once(char *URL, bool oldstyle) #else "postit2.c", #endif - -1); + CURL_ZERO_TERMINATED); if(res) printf("curl_mime_xxx(3) = %s\n", curl_easy_strerror(res)); @@ -193,7 +193,7 @@ static int once(char *URL, bool oldstyle) curl_global_cleanup(); return TEST_ERR_MAJOR_BAD; } - res = curl_mime_name(part, "submit", -1); + res = curl_mime_name(part, "submit", CURL_ZERO_TERMINATED); if(!res) res = curl_mime_data(part, #ifdef CURL_DOES_CONVERSIONS @@ -203,7 +203,7 @@ static int once(char *URL, bool oldstyle) #else "send", #endif - -1); + CURL_ZERO_TERMINATED); if(res) printf("curl_mime_xxx(4) = %s\n", curl_easy_strerror(res)); @@ -216,7 +216,7 @@ static int once(char *URL, bool oldstyle) curl_global_cleanup(); return TEST_ERR_MAJOR_BAD; } - res = curl_mime_name(part, "somename", -1); + res = curl_mime_name(part, "somename", CURL_ZERO_TERMINATED); if(!res) res = curl_mime_filename(part, "somefile.txt"); if(!res) |