summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-18 17:10:22 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-18 17:10:22 +0200
commit9d0fb05e46e011ecff520eda6d67800f96e66491 (patch)
tree6e04d654196fbfd4778d466bd696baac2e7b0b0d
parent6e9bb3405a731442274c6c2fe99983f1d413b1f9 (diff)
minimize scopes
-rw-r--r--src/curl/curl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/curl/curl.c b/src/curl/curl.c
index 020cdc24f..a45d0a154 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -430,7 +430,7 @@ GNUNET_CURL_job_cancel (struct GNUNET_CURL_Job *job)
* the JSON we received was malformed).
* @return NULL if downloading a JSON reply failed.
*/
-void *
+static void *
download_get_result (struct GNUNET_CURL_DownloadBuffer *db,
CURL *eh,
long *response_code)
@@ -523,15 +523,16 @@ GNUNET_CURL_perform2 (struct GNUNET_CURL_Context *ctx,
GNUNET_CURL_ResponseCleaner rc)
{
CURLMsg *cmsg;
- struct GNUNET_CURL_Job *job;
int n_running;
int n_completed;
- long response_code;
- void *response;
(void) curl_multi_perform (ctx->multi, &n_running);
while (NULL != (cmsg = curl_multi_info_read (ctx->multi, &n_completed)))
{
+ struct GNUNET_CURL_Job *job;
+ long response_code;
+ void *response;
+
/* Only documented return value is CURLMSG_DONE */
GNUNET_break (CURLMSG_DONE == cmsg->msg);
GNUNET_assert (CURLE_OK == curl_easy_getinfo (cmsg->easy_handle,
@@ -620,9 +621,8 @@ GNUNET_CURL_perform2 (struct GNUNET_CURL_Context *ctx,
void
GNUNET_CURL_perform (struct GNUNET_CURL_Context *ctx)
{
-
GNUNET_CURL_perform2 (ctx,
- download_get_result,
+ &download_get_result,
(GNUNET_CURL_ResponseCleaner) &json_decref);
}