mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
minor edit to re-use a variable and to hopefully avoid a (moot) warning
about code that won't be reached
This commit is contained in:
parent
3d9fb701e2
commit
1a61bcecfc
18
lib/url.c
18
lib/url.c
@ -374,7 +374,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
|
|||||||
CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
||||||
{
|
{
|
||||||
va_list param;
|
va_list param;
|
||||||
char *cookiefile;
|
char *argptr;
|
||||||
|
|
||||||
va_start(param, option);
|
va_start(param, option);
|
||||||
|
|
||||||
@ -728,12 +728,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
|||||||
/*
|
/*
|
||||||
* Set cookie file to read and parse. Can be used multiple times.
|
* Set cookie file to read and parse. Can be used multiple times.
|
||||||
*/
|
*/
|
||||||
cookiefile = (char *)va_arg(param, void *);
|
argptr = (char *)va_arg(param, void *);
|
||||||
if(cookiefile) {
|
if(argptr) {
|
||||||
struct curl_slist *cl;
|
struct curl_slist *cl;
|
||||||
/* append the cookie file name to the list of file names, and deal with
|
/* append the cookie file name to the list of file names, and deal with
|
||||||
them later */
|
them later */
|
||||||
cl = curl_slist_append(data->change.cookielist, cookiefile);
|
cl = curl_slist_append(data->change.cookielist, argptr);
|
||||||
|
|
||||||
if(!cl)
|
if(!cl)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
@ -1132,11 +1132,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
|||||||
/*
|
/*
|
||||||
* String that holds the SSL crypto engine.
|
* String that holds the SSL crypto engine.
|
||||||
*/
|
*/
|
||||||
{
|
argptr = va_arg(param, char *);
|
||||||
const char *cpTemp = va_arg(param, char *);
|
if (argptr && argptr[0]) {
|
||||||
if (cpTemp && cpTemp[0]) {
|
|
||||||
#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
|
#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
|
||||||
ENGINE *e = ENGINE_by_id(cpTemp);
|
ENGINE *e = ENGINE_by_id(argptr);
|
||||||
if (e) {
|
if (e) {
|
||||||
if (data->engine) {
|
if (data->engine) {
|
||||||
ENGINE_free(data->engine);
|
ENGINE_free(data->engine);
|
||||||
@ -1144,7 +1143,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
|||||||
data->engine = e;
|
data->engine = e;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
failf(data, "SSL Engine '%s' not found", cpTemp);
|
failf(data, "SSL Engine '%s' not found", argptr);
|
||||||
return CURLE_SSL_ENGINE_NOTFOUND;
|
return CURLE_SSL_ENGINE_NOTFOUND;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -1152,7 +1151,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
|||||||
return CURLE_SSL_ENGINE_NOTFOUND;
|
return CURLE_SSL_ENGINE_NOTFOUND;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CURLOPT_SSLENGINE_DEFAULT:
|
case CURLOPT_SSLENGINE_DEFAULT:
|
||||||
|
Loading…
Reference in New Issue
Block a user