combine-diff: 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>
Brandon Williams committed
Feb 14, 2018 at 10:59 UTC
06fffa000c3c3ab54f975474d5bb8d30dc914c03
1 file changed
+6
-6
combine-diff.c
+6
-6
@@ -162,7 +162,7 @@ enum coalesce_direction { MATCH, BASE, NEW };
162
163
/* Coalesce new lines into base by finding LCS */
164
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
165
- struct lline *new, int lennew,
165
+ struct lline *newline, int lennew,
166
unsigned long parent, long flags)
167
{
168
int **lcs;
@@ -170,12 +170,12 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
170
struct lline *baseend, *newend = NULL;
171
int i, j, origbaselen = *lenbase;
172
173
- if (new == NULL)
173
+ if (newline == NULL)
174
return base;
175
176
if (base == NULL) {
177
*lenbase = lennew;
178
- return new;
178
+ return newline;
179
}
180
181
/*
@@ -200,7 +200,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
200
directions[0][j] = NEW;
201
202
for (i = 1, baseend = base; i < origbaselen + 1; i++) {
203
- for (j = 1, newend = new; j < lennew + 1; j++) {
203
+ for (j = 1, newend = newline; j < lennew + 1; j++) {
204
if (match_string_spaces(baseend->line, baseend->len,
205
newend->line, newend->len, flags)) {
206
lcs[i][j] = lcs[i - 1][j - 1] + 1;
@@ -241,7 +241,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
241
if (lline->prev)
242
lline->prev->next = lline->next;
243
else
244
- new = lline->next;
244
+ newline = lline->next;
245
if (lline->next)
246
lline->next->prev = lline->prev;
247
@@ -270,7 +270,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
270
}
271
}
272
273
- newend = new;
273
+ newend = newline;
274
while (newend) {
275
struct lline *lline = newend;
276
newend = newend->next;