Fix remaining signedness errors

We can change the data type for 'size' but we have to cast len to size_t
for the comparisons with sizeof results.
This commit is contained in:
Kristian Høgsberg 2012-03-30 11:27:02 -04:00
parent 0ca75a4f32
commit 3cddb3c692
2 changed files with 4 additions and 4 deletions

View file

@ -499,8 +499,8 @@ handle_event(struct wl_display *display,
WL_EXPORT void
wl_display_iterate(struct wl_display *display, uint32_t mask)
{
uint32_t p[2], object, opcode, size;
int len;
uint32_t p[2], object;
int len, opcode, size;
mask &= display->mask;
if (mask == 0) {
@ -512,7 +512,7 @@ wl_display_iterate(struct wl_display *display, uint32_t mask)
len = wl_connection_data(display->connection, mask);
while (len > 0) {
if (len < sizeof p)
if ((size_t) len < sizeof p)
break;
wl_connection_copy(display->connection, p, sizeof p);