mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
AK: Use size_t for ByteBuffer sizes
This matches what we already do for string types.
This commit is contained in:
parent
1dfc66c7cc
commit
88b9fcb976
14 changed files with 75 additions and 70 deletions
|
@ -162,12 +162,12 @@ ByteBuffer Socket::receive(int max_size)
|
|||
|
||||
bool Socket::send(const ByteBuffer& data)
|
||||
{
|
||||
int nsent = ::send(fd(), data.data(), data.size(), 0);
|
||||
ssize_t nsent = ::send(fd(), data.data(), data.size(), 0);
|
||||
if (nsent < 0) {
|
||||
set_error(errno);
|
||||
return false;
|
||||
}
|
||||
ASSERT(nsent == data.size());
|
||||
ASSERT(static_cast<size_t>(nsent) == data.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue