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:
Frank Li
2009-08-16 13:34:03 +08:00
committed by Johannes Schindelin
parent 7ea14c8f59
commit 3c150abb10
3 changed files with 16 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;
}