From dfe96a190c5158c7bb5580c1c0969a9edf98413d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Fri, 3 Jan 2025 11:59:29 -0500 Subject: [PATCH] *Sigh* Borland. --- src/xpdev/sockwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xpdev/sockwrap.c b/src/xpdev/sockwrap.c index 5e0e527f05..bb458a4a91 100644 --- a/src/xpdev/sockwrap.c +++ b/src/xpdev/sockwrap.c @@ -181,11 +181,11 @@ off_t sendfilesocket(int sock, int file, off_t *offset, off_t count) while (total < count) { ssize_t rd = read(file, buf, sizeof(buf)); + ssize_t sent = 0; if (rd < 0) // Error return(-1); if (rd == 0) // EOF break; - ssize_t sent = 0; while (sent < rd) { ssize_t wr = sendsocket(sock, buf + sent, rd - sent); if (wr > 0) { -- GitLab