Commit Diff


commit - 00530cfb2a244d0bb8246b9c85f9b411a2ff75da
commit + db37e2c0e0f236d601b825eb1742db37478a938b
blob - b6a155e4947560654679e072157354ffb1c4aa6f
blob + 365f923eff07a2a419e8ea238c2fb77c1fe0f65f
--- lib/object.c
+++ lib/object.c
@@ -1405,7 +1405,7 @@ got_object_open_by_path(struct got_object **obj, struc
 	const struct got_error *err = NULL;
 	struct got_commit_object *commit = NULL;
 	struct got_tree_object *tree = NULL;
-	struct got_tree_entry *entry = NULL;
+	struct got_tree_entry *te = NULL;
 	char *seg, *s, *s0 = NULL;
 
 	*obj = NULL;
@@ -1454,19 +1454,18 @@ got_object_open_by_path(struct got_object **obj, struc
 		/* end of path segment */
 		*s = '\0';
 
-		entry = find_entry_by_name(tree, seg);
-		if (entry == NULL) {
+		te = find_entry_by_name(tree, seg);
+		if (te == NULL) {
 			err = got_error(GOT_ERR_NO_OBJ);
 			goto done;
 		}
 
 		seg = s + 1;
 		s++;
-
 		if (*s) {
 			err = got_object_open_as_tree(&next_tree, repo,
-			    entry->id);
-			entry = NULL;
+			    te->id);
+			te = NULL;
 			if (err)
 				goto done;
 			got_object_tree_close(tree);
@@ -1474,8 +1473,8 @@ got_object_open_by_path(struct got_object **obj, struc
 		}
 	}
 
-	if (entry)
-		err = got_object_open(obj, repo, entry->id);
+	if (te)
+		err = got_object_open(obj, repo, te->id);
 	else
 		err = got_error(GOT_ERR_NO_OBJ);
 done: