diff --git a/device-src/s3.c b/device-src/s3.c index 1b4cf10971..461f27ef4d 100644 --- a/device-src/s3.c +++ b/device-src/s3.c @@ -2634,13 +2634,13 @@ perform_request(S3Handle *hdl, } #endif - if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_HTTPGET, curlopt_httpget))) + if (curlopt_httpget && (curl_code = curl_easy_setopt(hdl->curl, CURLOPT_HTTPGET, curlopt_httpget))) goto curl_error; - if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_UPLOAD, curlopt_upload))) + if (curlopt_upload && (curl_code = curl_easy_setopt(hdl->curl, CURLOPT_UPLOAD, curlopt_upload))) goto curl_error; - if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_POST, curlopt_post))) + if (curlopt_post && (curl_code = curl_easy_setopt(hdl->curl, CURLOPT_POST, curlopt_post))) goto curl_error; - if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_NOBODY, curlopt_nobody))) + if (curlopt_nobody && (curl_code = curl_easy_setopt(hdl->curl, CURLOPT_NOBODY, curlopt_nobody))) goto curl_error; if ((curl_code = curl_easy_setopt(hdl->curl, CURLOPT_CUSTOMREQUEST, curlopt_customrequest)))