1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19: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-17 18:17:00 +01:00 committed by Andreas Kling
parent 7d783d8b84
commit 3f23a58fa1
9 changed files with 97 additions and 70 deletions

View file

@ -25,8 +25,7 @@
*/
#include "DHCPv4.h"
//#define DHCPV4_DEBUG
#include <AK/Debug.h>
ParsedDHCPv4Options DHCPv4Packet::parse_options() const
{
@ -42,12 +41,10 @@ ParsedDHCPv4Options DHCPv4Packet::parse_options() const
++index;
auto length = m_options[index];
if ((size_t)length > DHCPV4_OPTION_FIELD_MAX_LENGTH - index) {
dbg() << "Bogus option length " << length << " assuming forgotten END";
dbgln("Bogus option length {} assuming forgotten END", length);
break;
}
#ifdef DHCPV4_DEBUG
dbg() << "DHCP Option " << (u8)opt_name << " with length " << length;
#endif
dbgln<debug_dhcpv4>("DHCP Option {} with length {}", (u8)opt_name, length);
++index;
options.options.set(opt_name, { length, &m_options[index] });
index += length - 1;