summaryrefslogtreecommitdiff
path: root/src/connection.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-03-30 10:36:57 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-03-30 10:43:32 -0400
commit3fb304bb3e339ef67764b2d9bd5155bc10905255 (patch)
treeb60d6fcd0a62c3864ad2f09e9a667914aa558cbc /src/connection.c
parentba32db95321608b11f9283c0475812e1dc9897a1 (diff)
connection.c: Fix signedness warnings
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/connection.c b/src/connection.c
index 95d2bf1..2795481 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -458,7 +458,7 @@ wl_connection_vmarshal(struct wl_connection *connection,
s = va_arg(ap, const char *);
length = s ? strlen(s) + 1: 0;
- if (end - p < DIV_ROUNDUP(length, sizeof *p) + 1)
+ if (p + DIV_ROUNDUP(length, sizeof *p) + 1 > end)
goto err;
*p++ = length;
@@ -508,7 +508,7 @@ wl_connection_vmarshal(struct wl_connection *connection,
*p++ = 0;
break;
}
- if (end - p < DIV_ROUNDUP(array->size, sizeof *p) + 1)
+ if (p + DIV_ROUNDUP(array->size, sizeof *p) + 1 > end)
goto err;
*p++ = array->size;
memcpy(p, array->data, array->size);
@@ -573,7 +573,7 @@ wl_connection_demarshal(struct wl_connection *connection,
uint32_t *p, *next, *end, length;
int *fd;
char *extra, **s;
- int i, count, extra_space;
+ unsigned int i, count, extra_space;
struct wl_object **object;
struct wl_array **array;
struct wl_closure *closure = &connection->receive_closure;