Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
dir.c: remove the second declaration of "stk" in prep_exclude()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Tue, 21 Oct 2014 11:38:06 +0000
(18:38 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 21 Oct 2014 18:22:00 +0000
(11:22 -0700)
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>
dir.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
76f8611
)
diff --git
a/dir.c
b/dir.c
index 797805d6a1d33ef66ccb61155135cdcd1a53d9d0..c2a1c87f4969531bbb8ee2830fc639dc7fa89811 100644
(file)
--- 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;