From bb6a786b676ab5ea6a1a13b5c14ddd965d7583fc Mon Sep 17 00:00:00 2001 From: Josef Micka Date: Thu, 11 Apr 2024 14:49:32 +0200 Subject: Fix usbmuxd_send returning positive value on error Since socket_send already returns -errno, this function should pass it as is --- src/libusbmuxd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c index 8647ee2..8329bef 100644 --- a/src/libusbmuxd.c +++ b/src/libusbmuxd.c @@ -1593,7 +1593,7 @@ int usbmuxd_send(int sfd, const char *data, uint32_t len, uint32_t *sent_bytes) if (num_sent < 0) { *sent_bytes = 0; LIBUSBMUXD_DEBUG(1, "%s: Error %d when sending: %s\n", __func__, -num_sent, strerror(-num_sent)); - return -num_sent; + return num_sent; } if ((uint32_t)num_sent < len) { -- cgit v1.1-32-gdbae