Commit 413ea19d0efd603a9eb4da8dda7129f1e2432ca7

Stefan Sperling 2017-11-30T01:44:46

simplify

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/lib/diff.c b/lib/diff.c
index 8672748..af6392d 100644
--- a/lib/diff.c
+++ b/lib/diff.c
@@ -197,10 +197,9 @@ diff_entry_old_new(struct got_tree_entry *te1, struct got_tree_object *tree2)
 	} else if (S_ISREG(te1->mode) && S_ISREG(te2->mode)) {
 		if (!same_id(&te1->id, &te2->id))
 			return diff_modified_blob(&te1->id, &te2->id);
-	} else
-		return diff_kind_mismatch(&te1->id, &te2->id);
+	}
 
-	return NULL;
+	return diff_kind_mismatch(&te1->id, &te2->id);
 }
 
 static const struct got_error *