diff options
author | Nikias Bassen | 2024-03-27 02:08:06 +0100 |
---|---|---|
committer | Nikias Bassen | 2024-03-27 02:08:06 +0100 |
commit | 3d9f5dffd952b8f327ad43fafaf88ec44a921b6d (patch) | |
tree | 51884200edf0e4f8abda3ea0fbe3848713cf7c6a /src/libusbmuxd.c | |
parent | 303ece5fa462713552e0013b48b66a08955a12d4 (diff) | |
download | libusbmuxd-3d9f5dffd952b8f327ad43fafaf88ec44a921b6d.tar.gz libusbmuxd-3d9f5dffd952b8f327ad43fafaf88ec44a921b6d.tar.bz2 |
Use return value from socket_send instead of using errno
Diffstat (limited to 'src/libusbmuxd.c')
-rw-r--r-- | src/libusbmuxd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c index 39b3e5e..bdd184b 100644 --- a/src/libusbmuxd.c +++ b/src/libusbmuxd.c @@ -1592,8 +1592,7 @@ int usbmuxd_send(int sfd, const char *data, uint32_t len, uint32_t *sent_bytes) num_sent = socket_send(sfd, (void*)data, len); if (num_sent < 0) { *sent_bytes = 0; - num_sent = errno; - LIBUSBMUXD_DEBUG(1, "%s: Error %d when sending: %s\n", __func__, num_sent, strerror(num_sent)); + LIBUSBMUXD_DEBUG(1, "%s: Error %d when sending: %s\n", __func__, -num_sent, strerror(-num_sent)); return -num_sent; } |