geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit fc79d9a4d2cd906e09d9f046e9f1cc91e35b0f7e
parent 2ea7fc9967866e29f459515cbac7e03ce10e23a4
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 31 Mar 2023 20:22:25 +0200

xsplice: return -1 on error

Signed-off-by: Christoph Lohmann <20h@r-36.net>

Diffstat:
Mind.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ind.c b/ind.c @@ -116,14 +116,14 @@ xsplice(int fd, int sock) BLOCK_SIZE, SPLICE_F_MOVE | SPLICE_F_MORE); if (nread <= 0) { - ret = nread < 0 ? 1 : 0; + ret = nread < 0 ? -1 : 0; goto out; } nwritten = splice(pipefd[0], NULL, sock, NULL, BLOCK_SIZE, SPLICE_F_MOVE | SPLICE_F_MORE); if (nwritten < 0) { - ret = 1; + ret = -1; goto out; } } while (nwritten > 0);