changeset 27341:5042b999ef0a

parsers: narrow scope of a variable to be less confusing
author Bryan O'Sullivan <bos@serpentine.com>
date Sat, 12 Dec 2015 20:57:01 -0800
parents 7b8b6e3b3571
children 673ba59669b5
files mercurial/parsers.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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;