mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
Kernel: Fix always-true comparison warnings
This commit is contained in:
parent
b9f30c6f2a
commit
fda9f394d1
Notes:
sideshowbarker
2024-07-18 11:05:30 +09:00
Author: https://github.com/BertalanD
Commit: fda9f394d1
Pull-request: https://github.com/SerenityOS/serenity/pull/8354
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard
2 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ public:
|
||||||
auto new_region = MM.allocate_kernel_region(page_round_up(new_capacity), m_region->name(), m_region->access(), m_allocation_strategy);
|
auto new_region = MM.allocate_kernel_region(page_round_up(new_capacity), m_region->name(), m_region->access(), m_allocation_strategy);
|
||||||
if (!new_region)
|
if (!new_region)
|
||||||
return false;
|
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));
|
memcpy(new_region->vaddr().as_ptr(), data(), min(m_region->size(), m_size));
|
||||||
m_region = new_region.release_nonnull();
|
m_region = new_region.release_nonnull();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -460,7 +460,7 @@ Process* Scheduler::colonel()
|
||||||
|
|
||||||
UNMAP_AFTER_INIT void Scheduler::initialize()
|
UNMAP_AFTER_INIT void Scheduler::initialize()
|
||||||
{
|
{
|
||||||
VERIFY(&Processor::current() != nullptr); // sanity check
|
VERIFY(Processor::is_initialized()); // sanity check
|
||||||
|
|
||||||
RefPtr<Thread> idle_thread;
|
RefPtr<Thread> idle_thread;
|
||||||
g_finalizer_wait_queue = new WaitQueue;
|
g_finalizer_wait_queue = new WaitQueue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue