Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
pack-redundant: rename 'new' variables
author
Brandon Williams
<bmwill@google.com>
Wed, 14 Feb 2018 18:59:33 +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>
builtin/pack-redundant.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
8adda46
)
diff --git
a/builtin/pack-redundant.c
b/builtin/pack-redundant.c
index aaa8136322244ccde5b7d6804a3bc09b0c053568..991e1bb76fd66bb189a3523ea5cddf0cd823e343 100644
(file)
--- a/
builtin/pack-redundant.c
+++ b/
builtin/pack-redundant.c
@@
-48,17
+48,17
@@
static inline void llist_item_put(struct llist_item *item)
static inline struct llist_item *llist_item_get(void)
{
static inline struct llist_item *llist_item_get(void)
{
- struct llist_item *new;
+ struct llist_item *new
_item
;
if ( free_nodes ) {
if ( free_nodes ) {
- new = free_nodes;
+ new
_item
= free_nodes;
free_nodes = free_nodes->next;
} else {
int i = 1;
free_nodes = free_nodes->next;
} else {
int i = 1;
- ALLOC_ARRAY(new, BLKSIZE);
+ ALLOC_ARRAY(new
_item
, BLKSIZE);
for (; i < BLKSIZE; i++)
for (; i < BLKSIZE; i++)
- llist_item_put(&new[i]);
+ llist_item_put(&new
_item
[i]);
}
}
- return new;
+ return new
_item
;
}
static void llist_free(struct llist *list)
}
static void llist_free(struct llist *list)
@@
-80,26
+80,26
@@
static inline void llist_init(struct llist **list)
static struct llist * llist_copy(struct llist *list)
{
struct llist *ret;
static struct llist * llist_copy(struct llist *list)
{
struct llist *ret;
- struct llist_item *new
, *old
, *prev;
+ struct llist_item *new
_item, *old_item
, *prev;
llist_init(&ret);
if ((ret->size = list->size) == 0)
return ret;
llist_init(&ret);
if ((ret->size = list->size) == 0)
return ret;
- new = ret->front = llist_item_get();
- new->sha1 = list->front->sha1;
+ new
_item
= ret->front = llist_item_get();
+ new
_item
->sha1 = list->front->sha1;
- old = list->front->next;
- while (old) {
- prev = new;
- new = llist_item_get();
- prev->next = new;
- new
->sha1 = old
->sha1;
- old
= old
->next;
+ old
_item
= list->front->next;
+ while (old
_item
) {
+ prev = new
_item
;
+ new
_item
= llist_item_get();
+ prev->next = new
_item
;
+ new
_item->sha1 = old_item
->sha1;
+ old
_item = old_item
->next;
}
}
- new->next = NULL;
- ret->back = new;
+ new
_item
->next = NULL;
+ ret->back = new
_item
;
return ret;
}
return ret;
}
@@
-108,24
+108,24
@@
static inline struct llist_item *llist_insert(struct llist *list,
struct llist_item *after,
const unsigned char *sha1)
{
struct llist_item *after,
const unsigned char *sha1)
{
- struct llist_item *new = llist_item_get();
- new->sha1 = sha1;
- new->next = NULL;
+ struct llist_item *new
_item
= llist_item_get();
+ new
_item
->sha1 = sha1;
+ new
_item
->next = NULL;
if (after != NULL) {
if (after != NULL) {
- new->next = after->next;
- after->next = new;
+ new
_item
->next = after->next;
+ after->next = new
_item
;
if (after == list->back)
if (after == list->back)
- list->back = new;
+ list->back = new
_item
;
} else {/* insert in front */
if (list->size == 0)
} else {/* insert in front */
if (list->size == 0)
- list->back = new;
+ list->back = new
_item
;
else
else
- new->next = list->front;
- list->front = new;
+ new
_item
->next = list->front;
+ list->front = new
_item
;
}
list->size++;
}
list->size++;
- return new;
+ return new
_item
;
}
static inline struct llist_item *llist_insert_back(struct llist *list,
}
static inline struct llist_item *llist_insert_back(struct llist *list,