summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-10-21 18:38:06 +0700
committerJunio C Hamano <gitster@pobox.com>2014-10-21 11:22:00 -0700
commit03e11a715bffb0715ebcc9d6370aac7b968b3a4a (patch)
tree7ddf6ce3f50e021ea202ac76b868b2883fee7eb2 /dir.c
parent76f8611a5fb7e81c1bada0fb190d573a66fc03f6 (diff)
downloadgit-03e11a715bffb0715ebcc9d6370aac7b968b3a4a.tar.gz
dir.c: remove the second declaration of "stk" in prep_exclude()nd/dir-prep-exclude-cleanup
This "stk" shadows the first declaration at the top. There's currently no bad effect. But let's avoid it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 797805d6a1..c2a1c87f49 100644
--- a/dir.c
+++ b/dir.c
@@ -816,9 +816,9 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)
/* Read from the parent directories and push them down. */
current = stk ? stk->baselen : -1;
while (current < baselen) {
- struct exclude_stack *stk = xcalloc(1, sizeof(*stk));
const char *cp;
+ stk = xcalloc(1, sizeof(*stk));
if (current < 0) {
cp = base;
current = 0;