rename local variable in got_object_tree_path_changed()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
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,