{"thread":{"id":"37773","subject":"[PATCH] dir.c: remove the second declaration of \"stk\" in prep_exclude()","startedAt":"2014-10-21T11:38:06Z","lastAt":"2014-10-21T11:38:06Z","messageCount":1,"participants":["Nguyễn Thái Ngọc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"250893","messageId":"1413891486-24573-1-git-send-email-pclouds@gmail.com","threadId":"37773","inReplyTo":null,"subject":"[PATCH] dir.c: remove the second declaration of \"stk\" in prep_exclude()","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2014-10-21T11:38:06Z","receivedAt":"2014-10-21T11:38:06Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"This \"stk\" shadows the first declaration at the top. There's currently\nno bad effect. But let's avoid it.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n dir.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/dir.c b/dir.c\nindex bd274a7..3f7a025 100644\n--- a/dir.c\n+++ b/dir.c\n@@ -826,9 +826,9 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)\n \tcurrent = stk ? stk->baselen : -1;\n \tstrbuf_setlen(&dir->basebuf, current < 0 ? 0 : current);\n \twhile (current < baselen) {\n-\t\tstruct exclude_stack *stk = xcalloc(1, sizeof(*stk));\n \t\tconst char *cp;\n \n+\t\tstk = xcalloc(1, sizeof(*stk));\n \t\tif (current < 0) {\n \t\t\tcp = base;\n \t\t\tcurrent = 0;\n-- \n2.1.0.rc0.78.gc0d8480\n"}]}