summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-08-27 14:33:42 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-08-27 14:33:42 -0700
commit7ae96e3fcfcd4f3d7c18965eb8805554a9e432bc (patch)
treecd741e42d51387ffcfd7baeaa79e27ba5b45d3ae /tree-diff.c
parentMerge branch 'ep/worktree-quiet-option' (diff)
parentrefactor various if (x) FREE_AND_NULL(x) to just FREE_AND_NULL(x) (diff)
downloadtgif-7ae96e3fcfcd4f3d7c18965eb8805554a9e432bc.tar.xz
Merge branch 'ab/unconditional-free-and-null'
Code clean-up. * ab/unconditional-free-and-null: refactor various if (x) FREE_AND_NULL(x) to just FREE_AND_NULL(x)
Diffstat (limited to 'tree-diff.c')
-rw-r--r--tree-diff.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tree-diff.c b/tree-diff.c
index fe2e466ac1..553bc0e63a 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -557,9 +557,7 @@ struct combine_diff_path *diff_tree_paths(
* free pre-allocated last element, if any
* (see path_appendnew() for details about why)
*/
- if (p->next) {
- FREE_AND_NULL(p->next);
- }
+ FREE_AND_NULL(p->next);
return p;
}