Skip to content

Commit c3df856

Browse files
yoshfujiJunio C Hamano
authored andcommitted
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>
1 parent d6ebd25 commit c3df856

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

connect.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,10 @@ static int rhost_len;
455455
static int git_proxy_command_options(const char *var, const char *value)
456456
{
457457
if (!strcmp(var, "core.gitproxy")) {
458+
const char *for_pos;
459+
int matchlen = -1;
460+
int hostlen;
461+
458462
if (git_proxy_command)
459463
return 0;
460464
/* [core]
@@ -463,10 +467,7 @@ static int git_proxy_command_options(const char *var, const char *value)
463467
* gitproxy = netcatter-2 for sample.xz
464468
* gitproxy = netcatter-default
465469
*/
466-
const char *for_pos = strstr(value, " for ");
467-
int matchlen = -1;
468-
int hostlen;
469-
470+
for_pos = strstr(value, " for ");
470471
if (!for_pos)
471472
/* matches everybody */
472473
matchlen = strlen(value);

0 commit comments

Comments
 (0)