diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-10 10:30:08 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-10 10:30:08 +0200 |
commit | ca2857d81b5783b03d32ddc9d6f338bfec8d93dd (patch) | |
tree | c96c2b2fcd2fb5b31be71510fe4e7bbbc9d771b2 /src/merge.c | |
parent | 2d73075a41628634fa0c5572d760ad3aafffcf82 (diff) | |
download | libgit2-ca2857d81b5783b03d32ddc9d6f338bfec8d93dd.tar.gz |
merge: actually increment the counts, not the pointers
`merge_diff_list_count_candidates()` takes pointers to the source and
target counts, but when it comes time to increase them, we're increasing
the pointer, rather than the value it's pointing to.
Dereference the value to increase.
Diffstat (limited to 'src/merge.c')
-rw-r--r-- | src/merge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/merge.c b/src/merge.c index 28fca0038..517d317de 100644 --- a/src/merge.c +++ b/src/merge.c @@ -1143,9 +1143,9 @@ static void merge_diff_list_count_candidates( if (GIT_MERGE_INDEX_ENTRY_EXISTS(entry->ancestor_entry) && (!GIT_MERGE_INDEX_ENTRY_EXISTS(entry->our_entry) || !GIT_MERGE_INDEX_ENTRY_EXISTS(entry->their_entry))) - src_count++; + (*src_count)++; else if (!GIT_MERGE_INDEX_ENTRY_EXISTS(entry->ancestor_entry)) - tgt_count++; + (*tgt_count)++; } } |