Skip to content

Commit

Permalink
Test return value of finish_connect()
Browse files Browse the repository at this point in the history
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Franck Bui-Huu authored and Junio C Hamano committed Sep 13, 2006
1 parent cdad8bb commit 8a5dbef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -534,5 +534,5 @@ int main(int argc, char **argv)
}
}

return ret;
return !!ret;
}
4 changes: 2 additions & 2 deletions peek-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions send-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 8a5dbef

Please sign in to comment.