summaryrefslogtreecommitdiff
path: root/tree-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree-diff.c')
-rw-r--r--tree-diff.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tree-diff.c b/tree-diff.c
index fe2e466ac1..425668e1e0 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -491,7 +491,7 @@ static struct combine_diff_path *ll_diff_tree_paths(
continue;
/* diff(t,pi) != ΓΈ */
- if (oidcmp(t.entry.oid, tp[i].entry.oid) ||
+ if (!oideq(t.entry.oid, tp[i].entry.oid) ||
(t.entry.mode != tp[i].entry.mode))
continue;
@@ -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;
}