mirror of
https://github.com/git/git.git
synced 2026-04-03 13:30:47 +02:00
Avoid declaration after instruction
Microsoft Visual C++ does not understand this C99 style. Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Johannes Schindelin
parent
7ea14c8f59
commit
3c150abb10
3
help.c
3
help.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user