mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:38:12 +00:00
Everywhere: Debug macros instead of constexpr.
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
This commit is contained in:
parent
bb483f7ef4
commit
8465683dcf
98 changed files with 414 additions and 972 deletions
|
@ -156,7 +156,7 @@ void DHCPv4Client::handle_offer(const DHCPv4Packet& packet, const ParsedDHCPv4Op
|
|||
|
||||
void DHCPv4Client::handle_ack(const DHCPv4Packet& packet, const ParsedDHCPv4Options& options)
|
||||
{
|
||||
if constexpr (debug_dhcpv4_client) {
|
||||
if constexpr (DHCPV4CLIENT_DEBUG) {
|
||||
dbgln("The DHCP server handed us {}", packet.yiaddr().to_string());
|
||||
dbgln("Here are the options: {}", options.to_string());
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ void DHCPv4Client::process_incoming(const DHCPv4Packet& packet)
|
|||
{
|
||||
auto options = packet.parse_options();
|
||||
|
||||
dbgln<debug_dhcpv4_client>("Here are the options: {}", options.to_string());
|
||||
dbgln<DHCPV4CLIENT_DEBUG>("Here are the options: {}", options.to_string());
|
||||
|
||||
auto value = options.get<DHCPMessageType>(DHCPOption::DHCPMessageType).value();
|
||||
switch (value) {
|
||||
|
@ -239,7 +239,7 @@ void DHCPv4Client::dhcp_discover(const InterfaceDescriptor& iface, IPv4Address p
|
|||
{
|
||||
auto transaction_id = rand();
|
||||
|
||||
if constexpr (debug_dhcpv4_client) {
|
||||
if constexpr (DHCPV4CLIENT_DEBUG) {
|
||||
dbgln("Trying to lease an IP for {} with ID {}", iface.m_ifname, transaction_id);
|
||||
if (!previous.is_zero())
|
||||
dbgln("going to request the server to hand us {}", previous.to_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue