Nguyễn Thái Ngọc Duy
2014-10-21 11:38:06 UTC
This "stk" shadows the first declaration at the top. There's currently
no bad effect. But let's avoid it.
Signed-off-by: Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy <***@gmail=
=2Ecom>
---
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, co=
nst char *base, int baselen)
current =3D stk ? stk->baselen : -1;
strbuf_setlen(&dir->basebuf, current < 0 ? 0 : current);
while (current < baselen) {
- struct exclude_stack *stk =3D xcalloc(1, sizeof(*stk));
const char *cp;
=20
+ stk =3D xcalloc(1, sizeof(*stk));
if (current < 0) {
cp =3D base;
current =3D 0;
--=20
2.1.0.rc0.78.gc0d8480
no bad effect. But let's avoid it.
Signed-off-by: Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy <***@gmail=
=2Ecom>
---
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, co=
nst char *base, int baselen)
current =3D stk ? stk->baselen : -1;
strbuf_setlen(&dir->basebuf, current < 0 ? 0 : current);
while (current < baselen) {
- struct exclude_stack *stk =3D xcalloc(1, sizeof(*stk));
const char *cp;
=20
+ stk =3D xcalloc(1, sizeof(*stk));
if (current < 0) {
cp =3D base;
current =3D 0;
--=20
2.1.0.rc0.78.gc0d8480