Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-02 19:50:37 +0300
committerJunio C Hamano <gitster@pobox.com>2022-05-02 19:50:37 +0300
commitafe8a9070bc62db9cfde1e30147178c40d391d93 (patch)
treed237acac7915db89829db7da1d0405f2e595a68b /http-walker.c
parent7a618493facb79639231f797e492fab51fac2ba4 (diff)
tree-wide: apply equals-null.cocci
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/http-walker.c b/http-walker.c
index 910fae539b..b8f0f98ae1 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -59,7 +59,7 @@ static void start_object_request(struct walker *walker,
struct http_object_request *req;
req = new_http_object_request(obj_req->repo->base, &obj_req->oid);
- if (req == NULL) {
+ if (!req) {
obj_req->state = ABORTED;
return;
}
@@ -106,7 +106,7 @@ static void process_object_response(void *callback_data)
/* Use alternates if necessary */
if (missing_target(obj_req->req)) {
fetch_alternates(walker, alt->base);
- if (obj_req->repo->next != NULL) {
+ if (obj_req->repo->next) {
obj_req->repo =
obj_req->repo->next;
release_http_object_request(obj_req->req);
@@ -225,12 +225,12 @@ static void process_alternates_response(void *callback_data)
alt_req->url->buf);
active_requests++;
slot->in_use = 1;
- if (slot->finished != NULL)
+ if (slot->finished)
(*slot->finished) = 0;
if (!start_active_slot(slot)) {
cdata->got_alternates = -1;
slot->in_use = 0;
- if (slot->finished != NULL)
+ if (slot->finished)
(*slot->finished) = 1;
}
return;
@@ -443,7 +443,7 @@ static int http_fetch_pack(struct walker *walker, struct alt_base *repo, unsigne
}
preq = new_http_pack_request(target->hash, repo->base);
- if (preq == NULL)
+ if (!preq)
goto abort;
preq->slot->results = &results;
@@ -489,11 +489,11 @@ static int fetch_object(struct walker *walker, unsigned char *hash)
if (hasheq(obj_req->oid.hash, hash))
break;
}
- if (obj_req == NULL)
+ if (!obj_req)
return error("Couldn't find request for %s in the queue", hex);
if (has_object_file(&obj_req->oid)) {
- if (obj_req->req != NULL)
+ if (obj_req->req)
abort_http_object_request(obj_req->req);
abort_object_request(obj_req);
return 0;