Skip to content

Commit

Permalink
Kernel: Fix always-true comparison warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BertalanD authored and alimpfard committed Jul 2, 2021
1 parent b9f30c6 commit fda9f39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Kernel/KBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class KBufferImpl : public RefCounted<KBufferImpl> {
auto new_region = MM.allocate_kernel_region(page_round_up(new_capacity), m_region->name(), m_region->access(), m_allocation_strategy);
if (!new_region)
return false;
if (m_region && m_size > 0)
if (m_size > 0)
memcpy(new_region->vaddr().as_ptr(), data(), min(m_region->size(), m_size));
m_region = new_region.release_nonnull();
return true;
Expand Down
2 changes: 1 addition & 1 deletion Kernel/Scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ Process* Scheduler::colonel()

UNMAP_AFTER_INIT void Scheduler::initialize()
{
VERIFY(&Processor::current() != nullptr); // sanity check
VERIFY(Processor::is_initialized()); // sanity check

RefPtr<Thread> idle_thread;
g_finalizer_wait_queue = new WaitQueue;
Expand Down

0 comments on commit fda9f39

Please sign in to comment.