Test return value of finish_connect()

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Franck Bui-Huu 2006-09-13 10:26:47 +02:00 committed by Junio C Hamano
parent cdad8bbe92
commit 8a5dbef8ac
3 changed files with 6 additions and 6 deletions

View File

@ -519,7 +519,7 @@ int main(int argc, char **argv)
ret = fetch_pack(fd, nr_heads, heads); ret = fetch_pack(fd, nr_heads, heads);
close(fd[0]); close(fd[0]);
close(fd[1]); close(fd[1]);
finish_connect(pid); ret |= finish_connect(pid);
if (!ret && nr_heads) { if (!ret && nr_heads) {
/* If the heads to pull were given, we should have /* If the heads to pull were given, we should have
@ -534,5 +534,5 @@ int main(int argc, char **argv)
} }
} }
return ret; return !!ret;
} }

View File

@ -66,6 +66,6 @@ int main(int argc, char **argv)
ret = peek_remote(fd, flags); ret = peek_remote(fd, flags);
close(fd[0]); close(fd[0]);
close(fd[1]); close(fd[1]);
finish_connect(pid); ret |= finish_connect(pid);
return ret; return !!ret;
} }

View File

@ -408,6 +408,6 @@ int main(int argc, char **argv)
ret = send_pack(fd[0], fd[1], nr_heads, heads); ret = send_pack(fd[0], fd[1], nr_heads, heads);
close(fd[0]); close(fd[0]);
close(fd[1]); close(fd[1]);
finish_connect(pid); ret |= finish_connect(pid);
return ret; return !!ret;
} }