rename local variable in got_worktree_checkout_files()
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
diff --git a/lib/worktree.c b/lib/worktree.c
index d74ed85..72e810d 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -592,7 +592,7 @@ got_worktree_checkout_files(struct got_worktree *worktree,
struct got_tree_object *tree = NULL;
char *fileindex_path = NULL, *new_fileindex_path = NULL;
struct got_fileindex *fileindex = NULL;
- FILE *findex = NULL;
+ FILE *new_index = NULL;
err = lock_worktree(worktree, LOCK_EX);
if (err)
@@ -611,7 +611,8 @@ got_worktree_checkout_files(struct got_worktree *worktree,
goto done;
}
- err = got_opentemp_named(&new_fileindex_path, &findex, fileindex_path);
+ err = got_opentemp_named(&new_fileindex_path, &new_index,
+ fileindex_path);
if (err)
goto done;
@@ -651,7 +652,7 @@ got_worktree_checkout_files(struct got_worktree *worktree,
if (err)
goto done;
- err = got_fileindex_write(fileindex, findex);
+ err = got_fileindex_write(fileindex, new_index);
if (err)
goto done;
@@ -673,8 +674,8 @@ done:
free(commit_id);
if (new_fileindex_path)
unlink(new_fileindex_path);
- if (findex)
- fclose(findex);
+ if (new_index)
+ fclose(new_index);
free(new_fileindex_path);
free(fileindex_path);
got_fileindex_close(fileindex);