]> git.ipfire.org Git - thirdparty/git.git/commitdiff
log_tree_diff: get rid of extra check for NULL
authorSergey Organov <sorganov@gmail.com>
Fri, 28 Aug 2020 11:05:26 +0000 (14:05 +0300)
committerJunio C Hamano <gitster@pobox.com>
Sun, 6 Sep 2020 17:33:19 +0000 (10:33 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
log-tree.c

index c01932fa72bf32e4b5de401c64344f8bd509cb68..8ac285a25af58e73801263cb2ddd026ed6b7521d 100644 (file)
@@ -917,7 +917,7 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
        }
 
        /* More than one parent? */
        }
 
        /* More than one parent? */
-       if (parents && parents->next) {
+       if (parents->next) {
                if (opt->ignore_merges)
                        return 0;
                else if (opt->combine_merges)
                if (opt->ignore_merges)
                        return 0;
                else if (opt->combine_merges)