aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-02 10:15:55 -0700
committerJunio C Hamano <gitster@pobox.com>2022-05-02 10:15:55 -0700
commit7710d1be607a7c8549ddb560dda2dd97ff38ab7a (patch)
tree99aa46ec9597bc7292c1168ed2c04d4a9f3322cb /commit-graph.c
parentGit 2.36 (diff)
parenttree-wide: apply equals-null.cocci (diff)
downloadgit-7710d1be607a7c8549ddb560dda2dd97ff38ab7a.tar.gz
git-7710d1be607a7c8549ddb560dda2dd97ff38ab7a.zip
Merge branch 'ep/maint-equals-null-cocci' into ep/equals-null-cocci
* 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 'commit-graph.c')
-rw-r--r--commit-graph.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 441b36016b..fcd351ee00 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -2567,7 +2567,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
odb_parents = odb_commit->parents;
while (graph_parents) {
- if (odb_parents == NULL) {
+ if (!odb_parents) {
graph_report(_("commit-graph parent list for commit %s is too long"),
oid_to_hex(&cur_oid));
break;
@@ -2590,7 +2590,7 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
odb_parents = odb_parents->next;
}
- if (odb_parents != NULL)
+ if (odb_parents)
graph_report(_("commit-graph parent list for commit %s terminates early"),
oid_to_hex(&cur_oid));