Skip to content

Commit 03e11a7

Browse files
pcloudsgitster
authored andcommitted
dir.c: remove the second declaration of "stk" in prep_exclude()
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 76f8611 commit 03e11a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,9 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)
816816
/* Read from the parent directories and push them down. */
817817
current = stk ? stk->baselen : -1;
818818
while (current < baselen) {
819-
struct exclude_stack *stk = xcalloc(1, sizeof(*stk));
820819
const char *cp;
821820

821+
stk = xcalloc(1, sizeof(*stk));
822822
if (current < 0) {
823823
cp = base;
824824
current = 0;

0 commit comments

Comments
 (0)