Loading tests/libtest/mk-lib1521.pl +22 −15 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ ########################################################################### # Usage: # cat ../../include/curl/curl.h | perl mk-lib1521.pl > lib1521.c # perl mk-lib1521.pl < ../../include/curl/curl.h > lib1521.c # minimum and maximum long signed values my $minlong = "LONG_MIN"; Loading Loading @@ -106,9 +106,10 @@ curl_xferinfo_callback xferinfocb; int test(char *URL) { CURL *curl; CURL *dep; CURLSH *share; int res = 0; CURL *curl = NULL; CURL *dep = NULL; CURLSH *share = NULL; char errorbuffer[CURL_ERROR_SIZE]; void *conv_from_network_cb = NULL; void *conv_to_network_cb = NULL; Loading @@ -118,12 +119,16 @@ int test(char *URL) struct curl_slist *slist=NULL; struct curl_httppost *httppost=NULL; FILE *stream = stderr; struct data object; (void)URL; /* not used */ dep = curl_easy_init(); easy_init(dep); easy_init(curl); share = curl_share_init(); curl = curl_easy_init(); if(curl) { struct data object; if(!share) { res = CURLE_OUT_OF_MEMORY; goto test_cleanup; } HEADER ; Loading Loading @@ -204,11 +209,13 @@ while(<STDIN>) { print <<FOOTER curl_easy_setopt(curl, 1, 0); test_cleanup: curl_easy_cleanup(curl); curl_easy_cleanup(dep); curl_share_cleanup(share); } return 0; return res; } FOOTER ; Loading
tests/libtest/mk-lib1521.pl +22 −15 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ ########################################################################### # Usage: # cat ../../include/curl/curl.h | perl mk-lib1521.pl > lib1521.c # perl mk-lib1521.pl < ../../include/curl/curl.h > lib1521.c # minimum and maximum long signed values my $minlong = "LONG_MIN"; Loading Loading @@ -106,9 +106,10 @@ curl_xferinfo_callback xferinfocb; int test(char *URL) { CURL *curl; CURL *dep; CURLSH *share; int res = 0; CURL *curl = NULL; CURL *dep = NULL; CURLSH *share = NULL; char errorbuffer[CURL_ERROR_SIZE]; void *conv_from_network_cb = NULL; void *conv_to_network_cb = NULL; Loading @@ -118,12 +119,16 @@ int test(char *URL) struct curl_slist *slist=NULL; struct curl_httppost *httppost=NULL; FILE *stream = stderr; struct data object; (void)URL; /* not used */ dep = curl_easy_init(); easy_init(dep); easy_init(curl); share = curl_share_init(); curl = curl_easy_init(); if(curl) { struct data object; if(!share) { res = CURLE_OUT_OF_MEMORY; goto test_cleanup; } HEADER ; Loading Loading @@ -204,11 +209,13 @@ while(<STDIN>) { print <<FOOTER curl_easy_setopt(curl, 1, 0); test_cleanup: curl_easy_cleanup(curl); curl_easy_cleanup(dep); curl_share_cleanup(share); } return 0; return res; } FOOTER ;