test1513: Don't return an uninitialized variable on init failure

This commit is contained in:
Dan Fandrich 2014-05-05 15:29:23 +02:00
parent 37f484276d
commit 40e6af893b

View File

@ -47,7 +47,6 @@ static int progressKiller(void *arg,
int test(char *URL) int test(char *URL)
{ {
CURL *curl; CURL *curl;
CURLcode result;
int res=0; int res=0;
global_init(CURL_GLOBAL_ALL); global_init(CURL_GLOBAL_ALL);
@ -61,7 +60,7 @@ int test(char *URL)
easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL); easy_setopt(curl, CURLOPT_PROGRESSDATA, NULL);
easy_setopt(curl, CURLOPT_NOPROGRESS, (long)0); easy_setopt(curl, CURLOPT_NOPROGRESS, (long)0);
result = curl_easy_perform(curl); res = curl_easy_perform(curl);
test_cleanup: test_cleanup:
@ -70,5 +69,5 @@ test_cleanup:
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
curl_global_cleanup(); curl_global_cleanup();
return (int)result; return res;
} }