commit.c: rename variable named 'n' which masks previous declaration
The variable named 'n' was initially declared to be of type int. The name 'n' was reused inside inner blocks as a different type. Rename the uses within inner blocks to avoid confusion and give them a slightly more descriptive name. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey committed
Aug 27, 2009 at 11:16 UTC
f203d6969b7cfbb56460d5bf8e99b0a7d1abe03b
1 file changed
+5
-5
commit.c
+5
-5
@@ -564,13 +564,13 @@ static struct commit_list *merge_bases_many(struct commit *one, int n, struct co
564
while (interesting(list)) {
565
struct commit *commit;
566
struct commit_list *parents;
567
- struct commit_list *n;
567
+ struct commit_list *next;
568
int flags;
569
570
commit = list->item;
571
- n = list->next;
571
+ next = list->next;
572
free(list);
573
- list = n;
573
+ list = next;
574
575
flags = commit->object.flags & (PARENT1 | PARENT2 | STALE);
576
if (flags == (PARENT1 | PARENT2)) {
@@ -598,11 +598,11 @@ static struct commit_list *merge_bases_many(struct commit *one, int n, struct co
598
free_commit_list(list);
599
list = result; result = NULL;
600
while (list) {
601
- struct commit_list *n = list->next;
601
+ struct commit_list *next = list->next;
602
if (!(list->item->object.flags & STALE))
603
insert_by_date(list->item, &result);
604
free(list);
605
- list = n;
605
+ list = next;
606
}
607
return result;
608
}