summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-02-14 18:59:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-22 18:08:05 (GMT)
commit69caed593e4b66ae1efd457f1c060171dc9baa5a (patch)
tree8f46cce04a7abbb6c557dbd28f5068adfcb34bd8 /unpack-trees.c
parent176513264bd72d909ff931c59638dac6b861dbda (diff)
downloadgit-69caed593e4b66ae1efd457f1c060171dc9baa5a.zip
git-69caed593e4b66ae1efd457f1c060171dc9baa5a.tar.gz
git-69caed593e4b66ae1efd457f1c060171dc9baa5a.tar.bz2
unpack-trees: 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 'unpack-trees.c')
-rw-r--r--unpack-trees.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 96c3327..bdedabc 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -194,10 +194,10 @@ static int do_add_entry(struct unpack_trees_options *o, struct cache_entry *ce,
static struct cache_entry *dup_entry(const struct cache_entry *ce)
{
unsigned int size = ce_size(ce);
- struct cache_entry *new = xmalloc(size);
+ struct cache_entry *new_entry = xmalloc(size);
- memcpy(new, ce, size);
- return new;
+ memcpy(new_entry, ce, size);
+ return new_entry;
}
static void add_entry(struct unpack_trees_options *o,