diff options
author | Brandon Williams <bmwill@google.com> | 2018-02-14 10:59:40 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-22 10:08:05 -0800 |
commit | 94a5c5d5b095299f0d693d7d82608a60b23692a4 (patch) | |
tree | 153c4a53b50f536c324f354bfb3dd2ab44979710 /diffcore-delta.c | |
parent | 63a01c3f79ccfb03fc6bf5118e3c0492760dac56 (diff) | |
download | git-94a5c5d5b095299f0d693d7d82608a60b23692a4.tar.gz |
diffcore-delta: 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 'diffcore-delta.c')
-rw-r--r-- | diffcore-delta.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/diffcore-delta.c b/diffcore-delta.c index ebe70fb068..c83d45a047 100644 --- a/diffcore-delta.c +++ b/diffcore-delta.c @@ -48,16 +48,16 @@ struct spanhash_top { static struct spanhash_top *spanhash_rehash(struct spanhash_top *orig) { - struct spanhash_top *new; + struct spanhash_top *new_spanhash; int i; int osz = 1 << orig->alloc_log2; int sz = osz << 1; - new = xmalloc(st_add(sizeof(*orig), + new_spanhash = xmalloc(st_add(sizeof(*orig), st_mult(sizeof(struct spanhash), sz))); - new->alloc_log2 = orig->alloc_log2 + 1; - new->free = INITIAL_FREE(new->alloc_log2); - memset(new->data, 0, sizeof(struct spanhash) * sz); + new_spanhash->alloc_log2 = orig->alloc_log2 + 1; + new_spanhash->free = INITIAL_FREE(new_spanhash->alloc_log2); + memset(new_spanhash->data, 0, sizeof(struct spanhash) * sz); for (i = 0; i < osz; i++) { struct spanhash *o = &(orig->data[i]); int bucket; @@ -65,11 +65,11 @@ static struct spanhash_top *spanhash_rehash(struct spanhash_top *orig) continue; bucket = o->hashval & (sz - 1); while (1) { - struct spanhash *h = &(new->data[bucket++]); + struct spanhash *h = &(new_spanhash->data[bucket++]); if (!h->cnt) { h->hashval = o->hashval; h->cnt = o->cnt; - new->free--; + new_spanhash->free--; break; } if (sz <= bucket) @@ -77,7 +77,7 @@ static struct spanhash_top *spanhash_rehash(struct spanhash_top *orig) } } free(orig); - return new; + return new_spanhash; } static struct spanhash_top *add_spanhash(struct spanhash_top *top, |