summaryrefslogtreecommitdiff
path: root/sideband.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@lfos.de>2016-06-14 14:49:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-16 18:40:19 (GMT)
commit4c4b7d1d3b5be12ad83d0ecfc537b40af37462c9 (patch)
treed87a4bd2febac4d2ebf49d5bf3c275b0f6998c94 /sideband.c
parent05219a1276341e72d8082d76b7f5ed394b7437a4 (diff)
downloadgit-4c4b7d1d3b5be12ad83d0ecfc537b40af37462c9.zip
git-4c4b7d1d3b5be12ad83d0ecfc537b40af37462c9.tar.gz
git-4c4b7d1d3b5be12ad83d0ecfc537b40af37462c9.tar.bz2
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 'sideband.c')
-rw-r--r--sideband.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sideband.c b/sideband.c
index fde8adc..c09929d 100644
--- a/sideband.c
+++ b/sideband.c
@@ -124,9 +124,8 @@ int recv_sideband(const char *me, int in_stream, int out)
* fd is connected to the remote side; send the sideband data
* over multiplexed packet stream.
*/
-ssize_t send_sideband(int fd, int band, const char *data, ssize_t sz, int packet_max)
+void send_sideband(int fd, int band, const char *data, ssize_t sz, int packet_max)
{
- ssize_t ssz = sz;
const char *p = data;
while (sz) {
@@ -148,5 +147,4 @@ ssize_t send_sideband(int fd, int band, const char *data, ssize_t sz, int packet
p += n;
sz -= n;
}
- return ssz;
}