summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorFrank Li <lznuaa@gmail.com>2009-09-16 10:20:17 +0200
committerJunio C Hamano <gitster@pobox.com>2009-09-18 20:00:41 -0700
commit0d30ad71fa094dd89ae31b3381c2e63a41119c76 (patch)
tree83d47d51f0d0598e9cea631273b4cdd317957abc /help.c
parent812bdbc31b246fcd5f3293e4dbac27eaec1ef4fa (diff)
downloadgit-0d30ad71fa094dd89ae31b3381c2e63a41119c76.tar.gz
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>
Diffstat (limited to 'help.c')
-rw-r--r--help.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/help.c b/help.c
index 294337e71c..fd51b8e8ef 100644
--- a/help.c
+++ b/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;
}