From fbd5afc29a83a71f35ce22e50277851b495653e7 Mon Sep 17 00:00:00 2001 From: Kubat <mael.martin31@gmail.com> Date: Wed, 16 Feb 2022 22:38:43 +0100 Subject: [PATCH] BUILD: Fix wrong code after rebase on master --- src/main/lkt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/lkt.c b/src/main/lkt.c index 1b63f7e7..f7eb7926 100644 --- a/src/main/lkt.c +++ b/src/main/lkt.c @@ -313,8 +313,8 @@ write_socket(SOCKET sock, const char *format, ...) va_start(ap, format); const int size = safe_vsnprintf(buff, LKT_MESSAGE_MAX - 1, format, ap); - FAIL_IF(size < 0, "Failed to write to temporary buffer"); - FAIL_IF(fwrite(buff, sizeof(char), (size_t)size, sock) < (unsigned int)size, "Connexion error"); + FAIL_IF(size <= 0, "Failed to write to temporary buffer"); + FAIL_IF(send(sock, buff, (size_t)size, 0) < size, "Connexion error"); va_end(ap); } -- GitLab