diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-18 01:02:21 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-18 01:02:21 +0300 |
commit | a7a2e12b6eb97126f9d07298f281eb1c91730750 (patch) | |
tree | 84ed769e256ef366e0f003c93530a39051de10b3 /unpack-trees.c | |
parent | 93d08928910200969c486328e576057aada6f9dc (diff) | |
parent | cf82bff73f11d3197aa6b667002ea86da1dfa835 (diff) |
Merge branch 'jk/clang-sanitizer-fixes' into maint
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack-trees.c b/unpack-trees.c index 191e738143..70247aa331 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1350,7 +1350,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 |