diff options
author | Lukas Fleischer <lfleischer@lfos.de> | 2016-06-14 16:49:16 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-16 11:40:19 -0700 |
commit | 4c4b7d1d3b5be12ad83d0ecfc537b40af37462c9 (patch) | |
tree | d87a4bd2febac4d2ebf49d5bf3c275b0f6998c94 /upload-pack.c | |
parent | 05219a1276341e72d8082d76b7f5ed394b7437a4 (diff) | |
download | git-4c4b7d1d3b5be12ad83d0ecfc537b40af37462c9.tar.gz |
sideband.c: make send_sideband() return void
The send_sideband() function uses write_or_die() for writing data which
immediately terminates the process on errors. If no such error occurred,
send_sideband() always returned the value that was passed as fourth
parameter prior to this commit. This value is already known to the
caller in any case, so let's turn send_sideband() into a void function
instead.
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/upload-pack.c b/upload-pack.c index f19444df7b..f9d6410605 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -60,8 +60,10 @@ static void reset_timeout(void) static ssize_t send_client_data(int fd, const char *data, ssize_t sz) { - if (use_sideband) - return send_sideband(1, fd, data, sz, use_sideband); + if (use_sideband) { + send_sideband(1, fd, data, sz, use_sideband); + return sz; + } if (fd == 3) /* emergency quit */ fd = 2; |