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-21 01:26:59 +0300
committerJunio C Hamano <gitster@pobox.com>2022-05-21 01:26:59 +0300
commit538dc459a0331c48b893c9f6ca0be5917860bb99 (patch)
treed8b7cf10c62573f767116c14f7ffd0d9e1d8ec32 /http-push.c
parentacdeb10f91da939135fbacb847792ae237450d7d (diff)
parent72a4ea71e5f29e4078363e87e4471128ff713a62 (diff)
Merge branch 'ep/maint-equals-null-cocci'
Introduce and apply coccinelle rule to discourage an explicit comparison between a pointer and NULL, and applies the clean-up to the maintenance track. * ep/maint-equals-null-cocci: tree-wide: apply equals-null.cocci tree-wide: apply equals-null.cocci contrib/coccinnelle: add equals-null.cocci
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/http-push.c b/http-push.c
index f0c044dcf7..7dafb1331a 100644
--- a/http-push.c
+++ b/http-push.c
@@ -253,7 +253,7 @@ static void start_fetch_loose(struct transfer_request *request)
struct http_object_request *obj_req;
obj_req = new_http_object_request(repo->url, &request->obj->oid);
- if (obj_req == NULL) {
+ if (!obj_req) {
request->state = ABORTED;
return;
}
@@ -318,7 +318,7 @@ static void start_fetch_packed(struct transfer_request *request)
fprintf(stderr, " which contains %s\n", oid_to_hex(&request->obj->oid));
preq = new_http_pack_request(target->hash, repo->url);
- if (preq == NULL) {
+ if (!preq) {
repo->can_update_info_refs = 0;
return;
}
@@ -520,7 +520,7 @@ static void finish_request(struct transfer_request *request)
/* Keep locks active */
check_locks();
- if (request->headers != NULL)
+ if (request->headers)
curl_slist_free_all(request->headers);
/* URL is reused for MOVE after PUT and used during FETCH */
@@ -783,7 +783,7 @@ xml_start_tag(void *userData, const char *name, const char **atts)
const char *c = strchr(name, ':');
int old_namelen, new_len;
- if (c == NULL)
+ if (!c)
c = name;
else
c++;
@@ -811,7 +811,7 @@ xml_end_tag(void *userData, const char *name)
ctx->userFunc(ctx, 1);
- if (c == NULL)
+ if (!c)
c = name;
else
c++;
@@ -1893,7 +1893,7 @@ int cmd_main(int argc, const char **argv)
/* Lock remote branch ref */
ref_lock = lock_remote(ref->name, LOCK_TIME);
- if (ref_lock == NULL) {
+ if (!ref_lock) {
fprintf(stderr, "Unable to lock remote branch %s\n",
ref->name);
if (helper_status)