aboutsummaryrefslogtreecommitdiff
path: root/http-fetch.c
diff options
context:
space:
mode:
authorMark Wooding <mdw@distorted.org.uk>2006-02-01 11:44:39 +0000
committerJunio C Hamano <junkio@cox.net>2006-02-05 16:49:17 -0800
commita3f583cbf7929f290a47dc0a952ee6b0faa9d279 (patch)
tree6af26d7539af3aebce0363d44648d68a233f4dfa /http-fetch.c
parent7982d74e1ca846e6ab9b1bfb1fcd9c34e3fd534f (diff)
downloadgit-a3f583cbf7929f290a47dc0a952ee6b0faa9d279.tar.gz
git-a3f583cbf7929f290a47dc0a952ee6b0faa9d279.tar.xz
http-fetch: Tidy control flow in process_alternate_response
It's a bit convoluted. Tidy it up. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http-fetch.c')
-rw-r--r--http-fetch.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/http-fetch.c b/http-fetch.c
index 555e95d5a..bddbd6b10 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -468,13 +468,11 @@ static void process_alternates_response(void *callback_data)
alt_req->url);
active_requests++;
slot->in_use = 1;
- if (start_active_slot(slot)) {
- return;
- } else {
+ if (!start_active_slot(slot)) {
got_alternates = -1;
slot->in_use = 0;
- return;
}
+ return;
}
} else if (slot->curl_result != CURLE_OK) {
if (slot->http_code != 404 &&