Skip to content

Commit

Permalink
yutani: pex read() can return error code
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Aug 21, 2022
1 parent f84466b commit abe66fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/yutani.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ yutani_msg_t * yutani_poll(yutani_t * y) {
return out;
}

size_t size;
ssize_t size;
{
char tmp[MAX_PACKET_SIZE];
size = pex_recv(y->sock, tmp);
if (size <= 0) return NULL;
out = malloc(size);
memcpy(out, tmp, size);
}
Expand Down

0 comments on commit abe66fb

Please sign in to comment.