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>

Brandon Williams committed Feb 14, 2018 at 10:59 UTC 75b7b971ae07882c5ec6f76e21a0dbd76d70c187
2 files changed +9 -9
split-index.c
+8 -8
@@ -303,17 +303,17 @@ void save_or_free_index_entry(struct index_state *istate, struct cache_entry *ce
303 }
304
305 void replace_index_entry_in_base(struct index_state *istate,
306 - struct cache_entry *old,
307 - struct cache_entry *new)
306 + struct cache_entry *old_entry,
307 + struct cache_entry *new_entry)
308 {
309 - if (old->index &&
309 + if (old_entry->index &&
310 istate->split_index &&
311 istate->split_index->base &&
312 - old->index <= istate->split_index->base->cache_nr) {
313 - new->index = old->index;
314 - if (old != istate->split_index->base->cache[new->index - 1])
315 - free(istate->split_index->base->cache[new->index - 1]);
316 - istate->split_index->base->cache[new->index - 1] = new;
312 + old_entry->index <= istate->split_index->base->cache_nr) {
313 + new_entry->index = old_entry->index;
314 + if (old_entry != istate->split_index->base->cache[new_entry->index - 1])
315 + free(istate->split_index->base->cache[new_entry->index - 1]);
316 + istate->split_index->base->cache[new_entry->index - 1] = new_entry;
317 }
318 }
319
split-index.h
+1 -1
@@ -21,7 +21,7 @@ struct split_index *init_split_index(struct index_state *istate);
21 void save_or_free_index_entry(struct index_state *istate, struct cache_entry *ce);
22 void replace_index_entry_in_base(struct index_state *istate,
23 struct cache_entry *old,
24 - struct cache_entry *new);
24 + struct cache_entry *new_entry);
25 int read_link_extension(struct index_state *istate,
26 const void *data, unsigned long sz);
27 int write_link_extension(struct strbuf *sb,