parsers: narrow scope of a variable to be less confusing
authorBryan O'Sullivan <bos@serpentine.com>
Sat, 12 Dec 2015 20:57:01 -0800
changeset 27341 5042b999ef0a
parent 27340 7b8b6e3b3571
child 27342 673ba59669b5
parsers: narrow scope of a variable to be less confusing
mercurial/parsers.c
--- a/mercurial/parsers.c	Sat Dec 12 20:10:33 2015 -0800
+++ b/mercurial/parsers.c	Sat Dec 12 20:57:01 2015 -0800
@@ -1995,19 +1995,19 @@
 
 		for (i = 0; i < 2; i++) {
 			int p = parents[i];
-			long nsp, sp;
+			long sp;
 			int dp;
 
 			if (p == -1)
 				continue;
 
 			dp = depth[p];
-			nsp = sp = seen[p];
+			sp = seen[p];
 			if (dp <= dv) {
 				depth[p] = dv + 1;
 				if (sp != sv) {
 					interesting[sv] += 1;
-					nsp = seen[p] = sv;
+					seen[p] = sv;
 					if (sp) {
 						interesting[sp] -= 1;
 						if (interesting[sp] == 0)
@@ -2016,7 +2016,7 @@
 				}
 			}
 			else if (dv == dp - 1) {
-				nsp = sp | sv;
+				long nsp = sp | sv;
 				if (nsp == sp)
 					continue;
 				seen[p] = nsp;