usbmuxd_send(): return negative errno value on error
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c
index 1b57b69..a2366a6 100644
--- a/src/libusbmuxd.c
+++ b/src/libusbmuxd.c
@@ -1048,7 +1048,7 @@
 		*sent_bytes = 0;
 		num_sent = errno;
 		DEBUG(1, "%s: Error %d when sending: %s\n", __func__, num_sent, strerror(num_sent));
-		return num_sent;
+		return -num_sent;
 	} else if ((uint32_t)num_sent < len) {
 		DEBUG(1, "%s: Warning: Did not send enough (only %d of %d)\n", __func__, num_sent, len);
 	}