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;
}
- 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) {
- return false;
- }
-
- return true;
+ return curl_easy_getinfo(curl,
+ CURLINFO_RESPONSE_CODE, &ctx->res_code) == CURLE_OK &&
+ curl_easy_getinfo(curl,
+ CURLINFO_CONTENT_TYPE, &ctx->content_type) == CURLE_OK;
}
/*******************************************************************************
of the response body. */
*tokens = mh_xrealloc(*tokens, *tokens_len * sizeof **tokens);
}
- if (r <= 0) {
- return false;
- }
- return true;
+ return r > 0;
}
/*