summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2005-11-22 03:18:23 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-22 04:51:22 (GMT)
commitc3df8568424684bbcc7df7722eb3ec34bdae8b2d (patch)
tree05b4f5e6e3fee20f2e367a3ab8df55181b3c925c /connect.c
parentd6ebd2590cb427a564a7bc21f893b238ce26e26f (diff)
downloadgit-c3df8568424684bbcc7df7722eb3ec34bdae8b2d.zip
git-c3df8568424684bbcc7df7722eb3ec34bdae8b2d.tar.gz
git-c3df8568424684bbcc7df7722eb3ec34bdae8b2d.tar.bz2
GIT: Fix compilation error in connect.c
Fix compilation error for gcc-2.95. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'connect.c')
-rw-r--r--connect.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/connect.c b/connect.c
index a4d6d35..7a417e5 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);