Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
trailer: rename 'new' variables
author
Brandon Williams
<bmwill@google.com>
Wed, 14 Feb 2018 18:59:50 +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>
trailer.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
bc09991
)
diff --git
a/trailer.c
b/trailer.c
index 3ba157ed0d6157281f0a9e91f7b7f208652adfcc..5a4a2ecf9684e9aa95382b8ae46f457fc6bea5b0 100644
(file)
--- a/
trailer.c
+++ b/
trailer.c
@@
-174,12
+174,12
@@
static void print_all(FILE *outfile, struct list_head *head,
static struct trailer_item *trailer_from_arg(struct arg_item *arg_tok)
{
static struct trailer_item *trailer_from_arg(struct arg_item *arg_tok)
{
- struct trailer_item *new
= xcalloc(sizeof(*new
), 1);
- new->token = arg_tok->token;
- new->value = arg_tok->value;
+ struct trailer_item *new
_item = xcalloc(sizeof(*new_item
), 1);
+ new
_item
->token = arg_tok->token;
+ new
_item
->value = arg_tok->value;
arg_tok->token = arg_tok->value = NULL;
free_arg_item(arg_tok);
arg_tok->token = arg_tok->value = NULL;
free_arg_item(arg_tok);
- return new;
+ return new
_item
;
}
static void add_arg_to_input_list(struct trailer_item *on_tok,
}
static void add_arg_to_input_list(struct trailer_item *on_tok,
@@
-666,30
+666,30
@@
static void parse_trailer(struct strbuf *tok, struct strbuf *val,
static struct trailer_item *add_trailer_item(struct list_head *head, char *tok,
char *val)
{
static struct trailer_item *add_trailer_item(struct list_head *head, char *tok,
char *val)
{
- struct trailer_item *new
= xcalloc(sizeof(*new
), 1);
- new->token = tok;
- new->value = val;
- list_add_tail(&new->list, head);
- return new;
+ struct trailer_item *new
_item = xcalloc(sizeof(*new_item
), 1);
+ new
_item
->token = tok;
+ new
_item
->value = val;
+ list_add_tail(&new
_item
->list, head);
+ return new
_item
;
}
static void add_arg_item(struct list_head *arg_head, char *tok, char *val,
const struct conf_info *conf,
const struct new_trailer_item *new_trailer_item)
{
}
static void add_arg_item(struct list_head *arg_head, char *tok, char *val,
const struct conf_info *conf,
const struct new_trailer_item *new_trailer_item)
{
- struct arg_item *new
= xcalloc(sizeof(*new
), 1);
- new->token = tok;
- new->value = val;
- duplicate_conf(&new->conf, conf);
+ struct arg_item *new
_item = xcalloc(sizeof(*new_item
), 1);
+ new
_item
->token = tok;
+ new
_item
->value = val;
+ duplicate_conf(&new
_item
->conf, conf);
if (new_trailer_item) {
if (new_trailer_item->where != WHERE_DEFAULT)
if (new_trailer_item) {
if (new_trailer_item->where != WHERE_DEFAULT)
- new->conf.where = new_trailer_item->where;
+ new
_item
->conf.where = new_trailer_item->where;
if (new_trailer_item->if_exists != EXISTS_DEFAULT)
if (new_trailer_item->if_exists != EXISTS_DEFAULT)
- new->conf.if_exists = new_trailer_item->if_exists;
+ new
_item
->conf.if_exists = new_trailer_item->if_exists;
if (new_trailer_item->if_missing != MISSING_DEFAULT)
if (new_trailer_item->if_missing != MISSING_DEFAULT)
- new->conf.if_missing = new_trailer_item->if_missing;
+ new
_item
->conf.if_missing = new_trailer_item->if_missing;
}
}
- list_add_tail(&new->list, arg_head);
+ list_add_tail(&new
_item
->list, arg_head);
}
static void process_command_line_args(struct list_head *arg_head,
}
static void process_command_line_args(struct list_head *arg_head,