summaryrefslogtreecommitdiffstats
path: root/branch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-02 19:06:00 +0200
committerJunio C Hamano <gitster@pobox.com>2022-05-02 19:06:04 +0200
commit2b0a58d164b0642be3eeb476fecd28114445cdd5 (patch)
tree2759549fcdd5d3ce4c9776f67937b4b75c07070f /branch.c
parentGit 2.35.3 (diff)
parenttree-wide: apply equals-null.cocci (diff)
downloadgit-2b0a58d164b0642be3eeb476fecd28114445cdd5.tar.xz
git-2b0a58d164b0642be3eeb476fecd28114445cdd5.zip
Merge branch 'ep/maint-equals-null-cocci' for maint-2.35
* ep/maint-equals-null-cocci: tree-wide: apply equals-null.cocci contrib/coccinnelle: add equals-null.cocci
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/branch.c b/branch.c
index 5d20a2e848..bc46adfa25 100644
--- a/branch.c
+++ b/branch.c
@@ -405,7 +405,7 @@ void create_branch(struct repository *r,
break;
}
- if ((commit = lookup_commit_reference(r, &oid)) == NULL)
+ if (!(commit = lookup_commit_reference(r, &oid)))
die(_("not a valid branch point: '%s'"), start_name);
oidcpy(&oid, &commit->object.oid);