提交 13dc2f9e authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-2936 stage 5 handle varargs right

上级 d9089edf
#include <switch.h> #include <switch.h>
#include <curl/curl.h> #include <curl/curl.h>
CURLcode Curl_setopt(switch_CURL *curl, CURLoption option, va_list arg);
SWITCH_DECLARE(switch_CURL *) switch_curl_easy_init(void) SWITCH_DECLARE(switch_CURL *) switch_curl_easy_init(void)
{ {
...@@ -19,7 +21,7 @@ SWITCH_DECLARE(switch_CURLcode) switch_curl_easy_getinfo(switch_CURL *curl, swit ...@@ -19,7 +21,7 @@ SWITCH_DECLARE(switch_CURLcode) switch_curl_easy_getinfo(switch_CURL *curl, swit
switch_CURLcode code; switch_CURLcode code;
va_start(ap, info); va_start(ap, info);
code = curl_easy_getinfo(curl, info, ap); code = curl_easy_getinfo(curl, info, va_arg(ap, void *));
va_end(ap); va_end(ap);
return code; return code;
...@@ -51,7 +53,7 @@ SWITCH_DECLARE(switch_CURLcode) switch_curl_easy_setopt(CURL *handle, switch_CUR ...@@ -51,7 +53,7 @@ SWITCH_DECLARE(switch_CURLcode) switch_curl_easy_setopt(CURL *handle, switch_CUR
switch_CURLcode code; switch_CURLcode code;
va_start(ap, option); va_start(ap, option);
code = curl_easy_setopt(handle, option, ap); code = Curl_setopt(handle, option, ap);
va_end(ap); va_end(ap);
return code; return code;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论