Skip to content

Commit

Permalink
Fix usbmuxd_send returning positive value on error
Browse files Browse the repository at this point in the history
Since socket_send already returns -errno, this function should pass it as is
  • Loading branch information
mickacompelson authored and nikias committed Apr 15, 2024
1 parent 032bc1f commit bb6a786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libusbmuxd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bb6a786

Please sign in to comment.