1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
This commit is contained in:
asynts 2021-01-11 13:04:22 +01:00 committed by Andreas Kling
parent 510030971b
commit a410bb8fd5
7 changed files with 28 additions and 29 deletions

View file

@ -50,7 +50,6 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data)
ASSERT_NOT_REACHED();
return (u8)0;
}
// dbg() << "read_byte: " << String::format("%x", data[current]);
return data[current++];
};
@ -67,7 +66,7 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data)
// Compression method
auto method = read_byte();
if (method != 8) {
dbg() << "get_gzip_payload: Wrong compression method = " << method;
dbgln("get_gzip_payload: Wrong compression method={}", method);
return Optional<ByteBuffer>();
}
@ -79,7 +78,7 @@ static Optional<ByteBuffer> get_gzip_payload(const ByteBuffer& data)
// FEXTRA
if (flags & 4) {
u16 length = read_byte() & read_byte() << 8;
dbg() << "get_gzip_payload: Header has FEXTRA flag set. Length = " << length;
dbgln("get_gzip_payload: Header has FEXTRA flag set. length={}", length);
current += length;
}
@ -155,7 +154,7 @@ Optional<ByteBuffer> Gzip::decompress(const ByteBuffer& data)
#endif
destination.grow(destination.size() * 2);
} else {
dbg() << "Gzip::decompress: Error. puff() returned: " << puff_ret;
dbgln("Gzip::decompress: Error. puff() returned: {}", puff_ret);
ASSERT_NOT_REACHED();
}
}

View file

@ -75,7 +75,7 @@ bool Socket::connect(const String& hostname, int port)
{
auto* hostent = gethostbyname(hostname.characters());
if (!hostent) {
dbg() << "Socket::connect: Unable to resolve '" << hostname << "'";
dbgln("Socket::connect: Unable to resolve '{}'", hostname);
return false;
}

View file

@ -86,7 +86,7 @@ ByteBuffer UDPServer::receive(size_t size, sockaddr_in& in)
socklen_t in_len = sizeof(in);
ssize_t rlen = ::recvfrom(m_fd, buf.data(), size, 0, (sockaddr*)&in, &in_len);
if (rlen < 0) {
dbg() << "recvfrom: " << strerror(errno);
dbgln("recvfrom: {}", strerror(errno));
return {};
}