Skip to content

Commit

Permalink
Fix compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed May 20, 2024
1 parent 07745c3 commit 5bad781
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/lwan-io-wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ ssize_t lwan_send_fd(struct lwan_request *request,
} else {
to_send -= (size_t)written;
if (!to_send)
return count;
return (ssize_t)count;
buf = (char *)buf + written;
}

Expand All @@ -183,15 +183,15 @@ lwan_recv_fd(struct lwan_request *request, int fd, void *buf, size_t count, int
case EINTR:
case EAGAIN:
if (flags & MSG_DONTWAIT)
return count - to_recv;
return -EAGAIN;
break;
default:
return -errno;
}
} else {
to_recv -= (size_t)recvd;
if (!to_recv)
return count;
return (ssize_t)count;
buf = (char *)buf + recvd;
}

Expand Down

0 comments on commit 5bad781

Please sign in to comment.