mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sergey Organov <>
To: Junio C Hamano <>
Cc: Jeff King <>,, Sergey Organov <>
Subject: [PATCH 2/2] log_tree_diff: get rid of extra check for NULL
Date: Fri, 28 Aug 2020 14:05:26 +0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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 <>
 log-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)

  parent reply	other threads:[~2020-08-28 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 11:05 [PATCH 0/2] log_tree_diff: simplify Sergey Organov
2020-08-28 11:05 ` [PATCH 1/2] log_tree_diff: get rid of code duplication for first_parent_only Sergey Organov
2020-08-28 11:05 ` Sergey Organov [this message]
2020-09-04 12:38 ` [PATCH 0/2] log_tree_diff: simplify Sergey Organov
2020-09-06 21:52 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).