]> granicus.if.org Git - curl/commitdiff
lib1522: fix curl_easy_setopt argument type
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 24 Aug 2018 19:06:26 +0000 (21:06 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 24 Aug 2018 19:06:26 +0000 (21:06 +0200)
CURLOPT_POSTFIELDSIZE is a long option.

tests/libtest/lib1522.c

index 5a47a359c52180b3db9f7dd81602961abe79c1f0..2de95528414aef4220212c854ca821b226ba4c2a 100644 (file)
@@ -54,7 +54,7 @@ int test(char *URL)
   curl_easy_setopt(pCurl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
   curl_easy_setopt(pCurl, CURLOPT_URL, URL);
   curl_easy_setopt(pCurl, CURLOPT_POSTFIELDS, g_Data);
-  curl_easy_setopt(pCurl, CURLOPT_POSTFIELDSIZE, sizeof(g_Data));
+  curl_easy_setopt(pCurl, CURLOPT_POSTFIELDSIZE, (long)sizeof(g_Data));
 
   /* Remove "Expect: 100-continue" */
   pHeaderList = curl_slist_append(pHeaderList, "Expect:");