summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-02 16:50:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-05-02 16:50:37 (GMT)
commitafe8a9070bc62db9cfde1e30147178c40d391d93 (patch)
treed237acac7915db89829db7da1d0405f2e595a68b /commit-graph.c
parent7a618493facb79639231f797e492fab51fac2ba4 (diff)
downloadgit-afe8a9070bc62db9cfde1e30147178c40d391d93.zip
git-afe8a9070bc62db9cfde1e30147178c40d391d93.tar.gz
git-afe8a9070bc62db9cfde1e30147178c40d391d93.tar.bz2
tree-wide: apply equals-null.cocci
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 2706683..d251a99 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -2552,7 +2552,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;
@@ -2575,7 +2575,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));