summaryrefslogtreecommitdiff
path: root/Userland/Services/DHCPClient/DHCPv4.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-17 18:17:00 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-22 22:14:30 +0100
commit3f23a58fa1a0de922e36d82adccfccfb78b4049f (patch)
tree04fecee8357ad30cf6bf03ac5cbc3fdf061bbe83 /Userland/Services/DHCPClient/DHCPv4.cpp
parent7d783d8b84f8c55fd30af867437734a732fcfc17 (diff)
downloadserenity-3f23a58fa1a0de922e36d82adccfccfb78b4049f.zip
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.
Diffstat (limited to 'Userland/Services/DHCPClient/DHCPv4.cpp')
-rw-r--r--Userland/Services/DHCPClient/DHCPv4.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4.cpp b/Userland/Services/DHCPClient/DHCPv4.cpp
index 36430f4eec..0d2041405e 100644
--- a/Userland/Services/DHCPClient/DHCPv4.cpp
+++ b/Userland/Services/DHCPClient/DHCPv4.cpp
@@ -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;