]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/checkout.c
tree-wide: apply equals-null.cocci
[thirdparty/git.git] / builtin / checkout.c
index cbf73b8c9f65ae2fdd1d96265bd4972aeaa9bd68..c80b607cd88305cdeb44c3f6d9891775c6b436fc 100644 (file)
@@ -811,7 +811,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
                        if (ret)
                                return ret;
                        o.ancestor = old_branch_info->name;
-                       if (old_branch_info->name == NULL) {
+                       if (!old_branch_info->name) {
                                strbuf_add_unique_abbrev(&old_commit_shortname,
                                                         &old_branch_info->commit->object.oid,
                                                         DEFAULT_ABBREV);