From 03e11a715bffb0715ebcc9d6370aac7b968b3a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Tue, 21 Oct 2014 18:38:06 +0700 Subject: dir.c: remove the second declaration of "stk" in prep_exclude() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dir.c') 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; -- cgit v1.2.1