get_octopus_merge_bases(): cleanup redundant variable

pptr is needless. Some related code got cleaned as well.

Signed-off-by: Vasily Makarov <einmalfel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Vasily Makarov 2014-01-03 18:45:46 +04:00 committed by Junio C Hamano
parent 44484662d8
commit 6bc76725ea

View file

@ -841,12 +841,13 @@ static struct commit_list *merge_bases_many(struct commit *one, int n, struct co
struct commit_list *get_octopus_merge_bases(struct commit_list *in)
{
struct commit_list *i, *j, *k, *ret = NULL;
struct commit_list **pptr = &ret;
for (i = in; i; i = i->next) {
if (!ret)
pptr = &commit_list_insert(i->item, pptr)->next;
else {
if (!in)
return ret;
commit_list_insert(in->item, &ret);
for (i = in->next; i; i = i->next) {
struct commit_list *new = NULL, *end = NULL;
for (j = ret; j; j = j->next) {
@ -861,7 +862,6 @@ struct commit_list *get_octopus_merge_bases(struct commit_list *in)
}
ret = new;
}
}
return ret;
}