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:
Andreas Kling 2021-02-23 20:42:32 +01:00
parent b33a6a443e
commit 5d180d1f99
Notes: sideshowbarker 2024-07-18 21:58:46 +09:00
725 changed files with 3448 additions and 3448 deletions

View file

@ -67,7 +67,7 @@ UNMAP_AFTER_INIT VFS::~VFS()
InodeIdentifier VFS::root_inode_id() const
{
ASSERT(m_root_inode);
VERIFY(m_root_inode);
return m_root_inode->identifier();
}
@ -211,8 +211,8 @@ KResult VFS::traverse_directory_inode(Inode& dir_inode, Function<bool(const FS::
bool is_root_inode = dir_inode.identifier() == dir_inode.fs().root_inode()->identifier();
if (is_root_inode && !is_vfs_root(dir_inode.identifier()) && entry.name == "..") {
auto mount = find_mount_for_guest(dir_inode);
ASSERT(mount);
ASSERT(mount->host());
VERIFY(mount);
VERIFY(mount->host());
resolved_inode = mount->host()->identifier();
}
callback({ entry.name, resolved_inode, entry.file_type });
@ -697,7 +697,7 @@ KResult VFS::unlink(StringView path, Custody& base)
// We have just checked that the inode is not a directory, and thus it's not
// the root. So it should have a parent. Note that this would be invalidated
// if we were to support bind-mounting regular files on top of the root.
ASSERT(parent_custody);
VERIFY(parent_custody);
auto& parent_inode = parent_custody->inode();
auto current_process = Process::current();