summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-01-09 09:38:19 +0100
committerGravatar Nikias Bassen2014-01-09 09:38:19 +0100
commit37f8ba3c2bdfe54c50d4f7f7f396c38c63a354be (patch)
tree3ef833545509e94ad8c2e77aa5f765f192f7fa47
parentb9bc19376effea619c2455cb8d3fbe4ca6685c5d (diff)
downloadusbmuxd-37f8ba3c2bdfe54c50d4f7f7f396c38c63a354be.tar.gz
usbmuxd-37f8ba3c2bdfe54c50d4f7f7f396c38c63a354be.tar.bz2
client: fix 64-bit crash in process_send due to signed/unsigned foo
-rw-r--r--src/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.c b/src/client.c
index ed383b7..d4719c3 100644
--- a/src/client.c
+++ b/src/client.c
@@ -599,7 +599,7 @@ static int client_command(struct mux_client *client, struct usbmuxd_header *hdr)
static void process_send(struct mux_client *client)
{
- uint32_t res;
+ int res;
if(!client->ob_size) {
usbmuxd_log(LL_WARNING, "Client %d OUT process but nothing to send?", client->fd);
client->events &= ~POLLOUT;
@@ -611,7 +611,7 @@ static void process_send(struct mux_client *client)
client_close(client);
return;
}
- if(res == client->ob_size) {
+ if((uint32_t)res == client->ob_size) {
client->ob_size = 0;
client->events &= ~POLLOUT;
if(client->state == CLIENT_CONNECTING2) {