]> diplodocus.org Git - nmh/commitdiff
oauth.c: Remove unused assignments of function return value.
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 4 Sep 2017 09:29:21 +0000 (10:29 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 4 Sep 2017 09:29:21 +0000 (10:29 +0100)
`if ((status = foo()) != OK) return false;' doesn't need to set local
variable status.

sbr/oauth.c

index 3aeeccb..e91e0bb 100755 (executable)
@@ -945,7 +945,7 @@ post(struct curl_ctx *ctx, const char *url, const char *req_body)
         curl_easy_setopt(curl, CURLOPT_DEBUGDATA, ctx->log);
     }
 
         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;
     }
 
         return false;
     }
 
@@ -971,10 +971,10 @@ post(struct curl_ctx *ctx, const char *url, const char *req_body)
         return false;
     }
 
         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;
     }
 
         return false;
     }