diff mbox series

[2/2] log_tree_diff: get rid of extra check for NULL

Message ID 20200828110526.21145-3-sorganov@gmail.com (mailing list archive)
State Accepted
Commit 793d37c17ffab46507e14c4547ad2edc9ba9e3fe
Headers show
Series log_tree_diff: simplify | expand

Commit Message

Sergey Organov Aug. 28, 2020, 11:05 a.m. UTC
Get rid of needless check of 'parents' for NULL. The NULL case
is already handled right above, and 'parents' is dereferenced
without check below anyway.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
---
 log-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/log-tree.c b/log-tree.c
index c01932fa72bf..8ac285a25af5 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -917,7 +917,7 @@  static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
 	}
 
 	/* More than one parent? */
-	if (parents && parents->next) {
+	if (parents->next) {
 		if (opt->ignore_merges)
 			return 0;
 		else if (opt->combine_merges)