Commit 2969636801a678472e0c37a7d99b526651961210

Stefan Sperling 2018-11-05T16:58:13

rename local variable in got_object_tree_path_changed()

diff --git a/lib/object.c b/lib/object.c
index c58c241..6c29e98 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -816,7 +816,7 @@ got_object_tree_path_changed(int *changed,
 	struct got_tree_object *tree1 = NULL, *tree2 = NULL;
 	struct got_tree_entry *te1 = NULL, *te2 = NULL;
 	const char *seg, *s;
-	size_t seglen, len = strlen(path);
+	size_t seglen, remain = strlen(path);
 
 	*changed = 0;
 
@@ -832,15 +832,15 @@ got_object_tree_path_changed(int *changed,
 	tree2 = tree02;
 	s = path;
 	s++; /* skip leading '/' */
-	len--;
+	remain--;
 	seg = s;
 	seglen = 0;
-	while (len > 0) {
+	while (remain > 0) {
 		struct got_tree_object *next_tree1, *next_tree2;
 
 		if (*s != '/') {
 			s++;
-			len--;
+			remain--;
 			seglen++;
 			if (*s)
 				continue;
@@ -868,14 +868,14 @@ got_object_tree_path_changed(int *changed,
 			goto done;
 		}
 
-		if (len == 0) { /* final path element */
+		if (remain == 0) { /* final path element */
 			*changed = 1;
 			goto done;
 		}
 
 		seg = s + 1;
 		s++;
-		len--;
+		remain--;
 		seglen = 0;
 		if (*s) {
 			err = got_object_open_as_tree(&next_tree1, repo,