Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diffcore-delta: rename 'new' variables
author
Brandon Williams
<bmwill@google.com>
Wed, 14 Feb 2018 18:59:40 +0000
(10:59 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 22 Feb 2018 18:08:05 +0000
(10:08 -0800)
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>
diffcore-delta.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
63a01c3
)
diff --git
a/diffcore-delta.c
b/diffcore-delta.c
index ebe70fb068519be86437a11b980d804be0534c75..c83d45a0470d412c29f8c392e84bb010150dbb2a 100644
(file)
--- 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)
{
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;
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)));
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;
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) {
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;
if (!h->cnt) {
h->hashval = o->hashval;
h->cnt = o->cnt;
- new->free--;
+ new
_spanhash
->free--;
break;
}
if (sz <= bucket)
break;
}
if (sz <= bucket)
@@
-77,7
+77,7
@@
static struct spanhash_top *spanhash_rehash(struct spanhash_top *orig)
}
}
free(orig);
}
}
free(orig);
- return new;
+ return new
_spanhash
;
}
static struct spanhash_top *add_spanhash(struct spanhash_top *top,
}
static struct spanhash_top *add_spanhash(struct spanhash_top *top,