mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
This commit is contained in:
parent
b33a6a443e
commit
5d180d1f99
725 changed files with 3448 additions and 3448 deletions
|
@ -269,9 +269,9 @@ public:
|
|||
|
||||
void add_option(DHCPOption option, u8 length, const void* data)
|
||||
{
|
||||
ASSERT(m_can_add);
|
||||
VERIFY(m_can_add);
|
||||
// we need enough space to fit the option value, its length, and its data
|
||||
ASSERT(next_option_offset + length + 2 < DHCPV4_OPTION_FIELD_MAX_LENGTH);
|
||||
VERIFY(next_option_offset + length + 2 < DHCPV4_OPTION_FIELD_MAX_LENGTH);
|
||||
|
||||
auto* options = peek().options();
|
||||
options[next_option_offset++] = (u8)option;
|
||||
|
|
|
@ -126,7 +126,7 @@ DHCPv4Client::DHCPv4Client(Vector<InterfaceDescriptor> ifnames)
|
|||
|
||||
if (!m_server->bind({}, 68)) {
|
||||
dbgln("The server we just created somehow came already bound, refusing to continue");
|
||||
ASSERT_NOT_REACHED();
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
for (auto& iface : m_ifnames)
|
||||
|
@ -233,7 +233,7 @@ void DHCPv4Client::process_incoming(const DHCPv4Packet& packet)
|
|||
case DHCPMessageType::DHCPDecline:
|
||||
default:
|
||||
dbgln("I dunno what to do with this {}", (u8)value);
|
||||
ASSERT_NOT_REACHED();
|
||||
VERIFY_NOT_REACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ static u8 mac_part(const Vector<String>& parts, size_t index)
|
|||
static MACAddress mac_from_string(const String& str)
|
||||
{
|
||||
auto chunks = str.split(':');
|
||||
ASSERT(chunks.size() == 6); // should we...worry about this?
|
||||
VERIFY(chunks.size() == 6); // should we...worry about this?
|
||||
return {
|
||||
mac_part(chunks, 0), mac_part(chunks, 1), mac_part(chunks, 2),
|
||||
mac_part(chunks, 3), mac_part(chunks, 4), mac_part(chunks, 5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue