summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-12 20:41:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-12 20:41:36 (GMT)
commitb7833910180d7d762ad0bb0f59cb02ba9ef86710 (patch)
tree18808c68ce616bbed629e61b407817f29d926e42 /unpack-trees.c
parenta74c387495d1640537c5e163b053932ab1992156 (diff)
parentcf82bff73f11d3197aa6b667002ea86da1dfa835 (diff)
downloadgit-b7833910180d7d762ad0bb0f59cb02ba9ef86710.zip
git-b7833910180d7d762ad0bb0f59cb02ba9ef86710.tar.gz
git-b7833910180d7d762ad0bb0f59cb02ba9ef86710.tar.bz2
Merge branch 'jk/clang-sanitizer-fixes'
C pedantry ;-) fix. * jk/clang-sanitizer-fixes: obstack: avoid computing offsets from NULL pointer xdiff: avoid computing non-zero offset from NULL pointer avoid computing zero offsets from NULL pointer merge-recursive: use subtraction to flip stage merge-recursive: silence -Wxor-used-as-pow warning
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index e4b7c6c..da4d6d4 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1352,7 +1352,7 @@ static int clear_ce_flags_1(struct index_state *istate,
enum pattern_match_result default_match,
int progress_nr)
{
- struct cache_entry **cache_end = cache + nr;
+ struct cache_entry **cache_end = nr ? cache + nr : cache;
/*
* Process all entries that have the given prefix and meet