From c3df8568424684bbcc7df7722eb3ec34bdae8b2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?YOSHIFUJI=20Hideaki=20/=20=E5=90=89=E8=97=A4=E8=8B=B1?= =?utf8?q?=E6=98=8E?= Date: Tue, 22 Nov 2005 12:18:23 +0900 Subject: [PATCH] GIT: Fix compilation error in connect.c Fix compilation error for gcc-2.95. Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: Junio C Hamano --- connect.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/connect.c b/connect.c index a4d6d356f..7a417e5a7 100644 --- a/connect.c +++ b/connect.c @@ -455,6 +455,10 @@ static int rhost_len; static int git_proxy_command_options(const char *var, const char *value) { if (!strcmp(var, "core.gitproxy")) { + const char *for_pos; + int matchlen = -1; + int hostlen; + if (git_proxy_command) return 0; /* [core] @@ -463,10 +467,7 @@ static int git_proxy_command_options(const char *var, const char *value) * gitproxy = netcatter-2 for sample.xz * gitproxy = netcatter-default */ - const char *for_pos = strstr(value, " for "); - int matchlen = -1; - int hostlen; - + for_pos = strstr(value, " for "); if (!for_pos) /* matches everybody */ matchlen = strlen(value); -- 2.30.2