* [PATCH] dir.c: remove the second declaration of "stk" in prep_exclude()
@ 2014-10-21 11:38 Nguyễn Thái Ngọc Duy
0 siblings, 0 replies; only message in thread
From: Nguyễn Thái Ngọc Duy @ 2014-10-21 11:38 UTC (permalink / raw)
To: git; +Cc: Nguyễn Thái Ngọc Duy
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>
---
dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dir.c b/dir.c
index bd274a7..3f7a025 100644
--- a/dir.c
+++ b/dir.c
@@ -826,9 +826,9 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)
current = stk ? stk->baselen : -1;
strbuf_setlen(&dir->basebuf, current < 0 ? 0 : current);
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;
--
2.1.0.rc0.78.gc0d8480
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-21 11:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21 11:38 [PATCH] dir.c: remove the second declaration of "stk" in prep_exclude() Nguyễn Thái Ngọc Duy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).