summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2015-10-30 14:02:01 +0100
committerVicent Marti <tanoku@gmail.com>2015-11-02 13:47:04 +0100
commit1d0bed9de1de09388f0dbc304a8ad767600b04cf (patch)
treed69ee1f487a36c7ecc4dec74d7f0ad9de8102634 /src
parent4cacf5b59452caac3226a113135c476815a85617 (diff)
downloadlibgit2-1d0bed9de1de09388f0dbc304a8ad767600b04cf.tar.gz
merge-base: Style
Diffstat (limited to 'src')
-rw-r--r--src/merge.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/merge.c b/src/merge.c
index 44904ca04..bad5f9552 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -418,7 +418,9 @@ static int remove_redundant(git_revwalk *walk, git_vector *commits)
int error = 0;
redundant = git__calloc(commits->length, 1);
+ GITERR_CHECK_ALLOC(redundant);
filled_index = git__calloc((commits->length - 1), sizeof(unsigned int));
+ GITERR_CHECK_ALLOC(filled_index);
for (i = 0; i < commits->length; ++i) {
if ((error = git_commit_list_parse(walk, commits->contents[i])) < 0)
@@ -511,7 +513,10 @@ int git_merge__bases_many(git_commit_list **out, git_revwalk *walk, git_commit_l
return -1;
}
- /* more than one merge base -- remove redundants */
+ /*
+ * more than one merge base -- see if there are redundant merge
+ * bases and remove them
+ */
if (result && result->next) {
git_vector redundant = GIT_VECTOR_INIT;