Test return value of finish_connect()
authorFranck Bui-Huu <vagabon.xyz@gmail.com>
Wed, 13 Sep 2006 08:26:47 +0000 (10:26 +0200)
committerJunio C Hamano <junkio@cox.net>
Wed, 13 Sep 2006 19:20:15 +0000 (12:20 -0700)
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
fetch-pack.c
peek-remote.c
send-pack.c

index 377feded1ccafdece86499d1917d297145fd28ac..1b4d8272dce834d10b16ecbcea7ae2fa974fc856 100644 (file)
@@ -519,7 +519,7 @@ int main(int argc, char **argv)
        ret = fetch_pack(fd, nr_heads, heads);
        close(fd[0]);
        close(fd[1]);
-       finish_connect(pid);
+       ret |= finish_connect(pid);
 
        if (!ret && nr_heads) {
                /* If the heads to pull were given, we should have
@@ -534,5 +534,5 @@ int main(int argc, char **argv)
                        }
        }
 
-       return ret;
+       return !!ret;
 }
index 87f1543fec05e88fd1bc554740993397f0aa3807..353da002b4c7632ed66c1b3ceacaa985ec137627 100644 (file)
@@ -66,6 +66,6 @@ int main(int argc, char **argv)
        ret = peek_remote(fd, flags);
        close(fd[0]);
        close(fd[1]);
-       finish_connect(pid);
-       return ret;
+       ret |= finish_connect(pid);
+       return !!ret;
 }
index ac4501d34154301030cf98ff122eb233095417b7..5172ef8be82daf88b19c976ce88463f8b647d933 100644 (file)
@@ -408,6 +408,6 @@ int main(int argc, char **argv)
        ret = send_pack(fd[0], fd[1], nr_heads, heads);
        close(fd[0]);
        close(fd[1]);
-       finish_connect(pid);
-       return ret;
+       ret |= finish_connect(pid);
+       return !!ret;
 }