Avoid declaration after statement

MSVC does not understand this C99 style.

Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Frank Li
2009-09-16 10:20:17 +02:00
committed by Junio C Hamano
parent 812bdbc31b
commit 0d30ad71fa
3 changed files with 14 additions and 5 deletions

3
help.c
View File

@ -127,7 +127,7 @@ static int is_executable(const char *name)
return 0;
#ifdef __MINGW32__
/* cannot trust the executable bit, peek into the file instead */
{ /* cannot trust the executable bit, peek into the file instead */
char buf[3] = { 0 };
int n;
int fd = open(name, O_RDONLY);
@ -140,6 +140,7 @@ static int is_executable(const char *name)
st.st_mode |= S_IXUSR;
close(fd);
}
}
#endif
return st.st_mode & S_IXUSR;
}