reachableroots: narrow scope of minidx variable
authorYuya Nishihara <yuya@tcha.org>
Fri, 14 Aug 2015 12:22:08 +0900
changeset 26079 cefd5c8bab5d
parent 26078 5ca587348875
child 26080 83c9edcac05c
reachableroots: narrow scope of minidx variable minidx is never used if includepath is false, so let's define it where it is used.
mercurial/parsers.c
--- a/mercurial/parsers.c	Tue Aug 25 15:54:33 2015 -0700
+++ b/mercurial/parsers.c	Fri Aug 14 12:22:08 2015 +0900
@@ -1127,7 +1127,6 @@
 	Py_ssize_t i;
 	Py_ssize_t l;
 	int r;
-	int minidx;
 	int parents[2];
 
 	/* Internal data structure:
@@ -1229,7 +1228,7 @@
 	/* Find all the nodes in between the roots we found and the heads
 	 * and add them to the reachable set */
 	if (includepath == 1) {
-		minidx = minroot;
+		int minidx = minroot;
 		if (minidx < 0)
 			minidx = 0;
 		for (i = minidx; i < len; i++) {