diff options
author | Tim Angus <tim@ngus.net> | 2015-09-09 22:32:12 +0100 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2016-04-07 11:05:38 +0100 |
commit | 9bb0f2a8841f4bf5d1af9e516e547ecdfdb6f0d8 (patch) | |
tree | 760bf4166706a8b63d2c006549692ac05d779088 | |
parent | 88bdc8f9da2a1d3f31de758f1a2b75f87284b133 (diff) |
Fix wonky va_list usage
-rw-r--r-- | src/client/cl_curl.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/client/cl_curl.c b/src/client/cl_curl.c index 572ed550..80aefabe 100644 --- a/src/client/cl_curl.c +++ b/src/client/cl_curl.c @@ -218,14 +218,11 @@ static size_t CL_cURL_CallbackWrite(void *buffer, size_t size, size_t nmemb, return size*nmemb; } -CURLcode qcurl_easy_setopt_warn(CURL *curl, CURLoption option, ...) +static CURLcode qcurl_easy_setopt_warn_valist(CURL *curl, CURLoption option, va_list args) { CURLcode result; - va_list args; - va_start(args, option); result = qcurl_easy_setopt(curl, option, args); - va_end(args); if(result != CURLE_OK) { Com_DPrintf("qcurl_easy_setopt failed: %s\n", qcurl_easy_strerror(result)); } @@ -233,6 +230,18 @@ CURLcode qcurl_easy_setopt_warn(CURL *curl, CURLoption option, ...) return result; } +CURLcode qcurl_easy_setopt_warn(CURL *curl, CURLoption option, ...) +{ + CURLcode result; + + va_list argp; + va_start(argp, option); + result = qcurl_easy_setopt_warn_valist(curl, option, argp); + va_end(argp); + + return result; +} + void CL_cURL_BeginDownload( const char *localName, const char *remoteURL ) { CURLMcode result; |