diff options
author | Brandon Williams <bmwill@google.com> | 2018-02-14 21:59:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-22 21:08:05 +0300 |
commit | 75b7b971ae07882c5ec6f76e21a0dbd76d70c187 (patch) | |
tree | fa8df071e194f3d0a916149cd4aa62d039df0330 /split-index.c | |
parent | f3bbe630389480666ff865a7563859de4722664d (diff) |
split-index: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'split-index.c')
-rw-r--r-- | split-index.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/split-index.c b/split-index.c index 83e39ec8d7..7be5f748a6 100644 --- a/split-index.c +++ b/split-index.c @@ -303,17 +303,17 @@ void save_or_free_index_entry(struct index_state *istate, struct cache_entry *ce } void replace_index_entry_in_base(struct index_state *istate, - struct cache_entry *old, - struct cache_entry *new) + struct cache_entry *old_entry, + struct cache_entry *new_entry) { - if (old->index && + if (old_entry->index && istate->split_index && istate->split_index->base && - old->index <= istate->split_index->base->cache_nr) { - new->index = old->index; - if (old != istate->split_index->base->cache[new->index - 1]) - free(istate->split_index->base->cache[new->index - 1]); - istate->split_index->base->cache[new->index - 1] = new; + old_entry->index <= istate->split_index->base->cache_nr) { + new_entry->index = old_entry->index; + if (old_entry != istate->split_index->base->cache[new_entry->index - 1]) + free(istate->split_index->base->cache[new_entry->index - 1]); + istate->split_index->base->cache[new_entry->index - 1] = new_entry; } } |