Skip to content

Commit

Permalink
dir.c: remove the second declaration of "stk" in prep_exclude()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Oct 21, 2014
1 parent 76f8611 commit 03e11a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03e11a7

Please sign in to comment.