From: Ralph Corderoy Date: Mon, 4 Sep 2017 09:29:21 +0000 (+0100) Subject: oauth.c: Remove unused assignments of function return value. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/b66e1ec280f1f77dd9caf8077517b4be3ff35627?ds=inline oauth.c: Remove unused assignments of function return value. `if ((status = foo()) != OK) return false;' doesn't need to set local variable status. --- diff --git a/sbr/oauth.c b/sbr/oauth.c index 3aeeccbe..e91e0bb4 100755 --- a/sbr/oauth.c +++ b/sbr/oauth.c @@ -945,7 +945,7 @@ post(struct curl_ctx *ctx, const char *url, const char *req_body) curl_easy_setopt(curl, CURLOPT_DEBUGDATA, ctx->log); } - if ((status = curl_easy_setopt(curl, CURLOPT_URL, url)) != CURLE_OK) { + if (curl_easy_setopt(curl, CURLOPT_URL, url) != CURLE_OK) { return false; } @@ -971,10 +971,10 @@ post(struct curl_ctx *ctx, const char *url, const char *req_body) return false; } - if ((status = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, - &ctx->res_code)) != CURLE_OK - || (status = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, - &ctx->content_type)) != CURLE_OK) { + if (curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, + &ctx->res_code) != CURLE_OK + || curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, + &ctx->content_type) != CURLE_OK) { return false; }