Skip to content

Commit

Permalink
tcp: fix win32 warnings (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored Feb 23, 2022
1 parent ba235d5 commit 8bbf551
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tcp/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static int dequeue(struct tcp_conn *tc)
}

n = send(tc->fdc, BUF_CAST mbuf_buf(&qe->mb),
qe->mb.end - qe->mb.pos, flags);
SIZ_CAST qe->mb.end - qe->mb.pos, flags);
if (n < 0) {
if (EAGAIN == errno)
return 0;
Expand Down Expand Up @@ -372,7 +372,7 @@ static void tcp_recv_handler(int flags, void *arg)
if (!mb)
return;

n = recv(tc->fdc, BUF_CAST mb->buf, mb->size, 0);
n = recv(tc->fdc, BUF_CAST mb->buf, SIZ_CAST mb->size, 0);
if (0 == n) {
mem_deref(mb);
conn_close(tc, 0);
Expand Down Expand Up @@ -1144,7 +1144,8 @@ static int tcp_send_internal(struct tcp_conn *tc, struct mbuf *mb,
if (tc->sendq.head)
return enqueue(tc, mb);

n = send(tc->fdc, BUF_CAST mbuf_buf(mb), mb->end - mb->pos, flags);
n = send(tc->fdc, BUF_CAST mbuf_buf(mb),
SIZ_CAST mb->end - mb->pos, flags);
if (n < 0) {

if (EAGAIN == errno)
Expand Down

0 comments on commit 8bbf551

Please sign in to comment.