diff --git a/AK/CircularDuplexStream.h b/AK/CircularDuplexStream.h index d581c9e79c9..e6d9b23826d 100644 --- a/AK/CircularDuplexStream.h +++ b/AK/CircularDuplexStream.h @@ -96,14 +96,14 @@ public: bool unreliable_eof() const override { return eof(); } bool eof() const { return m_queue.size() == 0; } - size_t remaining_contigous_space() const + size_t remaining_contiguous_space() const { return min(Capacity - m_queue.size(), m_queue.capacity() - (m_queue.head_index() + m_queue.size()) % Capacity); } - Bytes reserve_contigous_space(size_t count) + Bytes reserve_contiguous_space(size_t count) { - VERIFY(count <= remaining_contigous_space()); + VERIFY(count <= remaining_contiguous_space()); Bytes bytes { m_queue.m_storage + (m_queue.head_index() + m_queue.size()) % Capacity, count }; diff --git a/AK/DistinctNumeric.h b/AK/DistinctNumeric.h index c6d98b66bc9..308668451eb 100644 --- a/AK/DistinctNumeric.h +++ b/AK/DistinctNumeric.h @@ -129,7 +129,7 @@ public: return !this->m_value; } // Intentionally don't define `operator bool() const` here. C++ is a bit - // overzealos, and whenever there would be a type error, C++ instead tries + // overzealous, and whenever there would be a type error, C++ instead tries // to convert to a common int-ish type first. `bool` is int-ish, so // `operator bool() const` would defy the entire point of this class. diff --git a/Documentation/RunningTests.md b/Documentation/RunningTests.md index 2479018f5cd..9702985ef80 100644 --- a/Documentation/RunningTests.md +++ b/Documentation/RunningTests.md @@ -47,7 +47,7 @@ classes of common C++ errors, including memory leaks, out of bounds access to st signed integer overflow. For more info on the sanitizers, check out the Address Sanitizer [wiki page](https://github.com/google/sanitizers/wiki), or the Undefined Sanitizer [documentation](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) from clang. -Note that a sanitizer build will take significantly longer than a non-santizer build, and will mess with caches in tools such as `ccache`. +Note that a sanitizer build will take significantly longer than a non-sanitizer build, and will mess with caches in tools such as `ccache`. The sanitizers can be enabled with the `-DENABLE_FOO_SANITIZER` set of flags. For the Serenity target, only the Undefined Sanitizers is supported. ```sh diff --git a/Documentation/VSCodeConfiguration.md b/Documentation/VSCodeConfiguration.md index c60c1b168dd..9a1e2d3b7bf 100644 --- a/Documentation/VSCodeConfiguration.md +++ b/Documentation/VSCodeConfiguration.md @@ -88,7 +88,7 @@ These extensions can be used as-is, but you need to point them to the custom Ser ``` -Most nonsentical errors from the extension also involve not finding methods, types etc. +Most nonsensical errors from the extension also involve not finding methods, types etc. ### DSL syntax highlighting @@ -337,7 +337,7 @@ The following snippet may be useful if you want to quickly generate a license he " * SPDX-License-Identifier: BSD-2-Clause", " */" ], - "description": "Licence header" + "description": "License header" } } ``` diff --git a/Kernel/Bus/USB/UHCI/UHCIController.cpp b/Kernel/Bus/USB/UHCI/UHCIController.cpp index 3f98fe2f5cc..e14e5528825 100644 --- a/Kernel/Bus/USB/UHCI/UHCIController.cpp +++ b/Kernel/Bus/USB/UHCI/UHCIController.cpp @@ -47,7 +47,7 @@ static constexpr u16 UHCI_FRAMELIST_FRAME_INVALID = 0x0001; // Port stuff static constexpr u8 UHCI_ROOT_PORT_COUNT = 2; -static constexpr u16 UHCI_PORTSC_CURRRENT_CONNECT_STATUS = 0x0001; +static constexpr u16 UHCI_PORTSC_CURRENT_CONNECT_STATUS = 0x0001; static constexpr u16 UHCI_PORTSC_CONNECT_STATUS_CHANGED = 0x0002; static constexpr u16 UHCI_PORTSC_PORT_ENABLED = 0x0004; static constexpr u16 UHCI_PORTSC_PORT_ENABLE_CHANGED = 0x0008; @@ -56,7 +56,7 @@ static constexpr u16 UHCI_PORTSC_RESUME_DETECT = 0x40; static constexpr u16 UHCI_PORTSC_LOW_SPEED_DEVICE = 0x0100; static constexpr u16 UHCI_PORTSC_PORT_RESET = 0x0200; static constexpr u16 UHCI_PORTSC_SUSPEND = 0x1000; -static constexpr u16 UCHI_PORTSC_NON_WRITE_CLEAR_BIT_MASK = 0x1FF5; // This is used to mask out the Write Clear bits making sure we don't accidentally clear them. +static constexpr u16 UHCI_PORTSC_NON_WRITE_CLEAR_BIT_MASK = 0x1FF5; // This is used to mask out the Write Clear bits making sure we don't accidentally clear them. // *BSD and a few other drivers seem to use this number static constexpr u8 UHCI_NUMBER_OF_ISOCHRONOUS_TDS = 128; @@ -511,7 +511,7 @@ void UHCIController::get_port_status(Badge, u8 port, HubStatus& hub u16 status = port == 0 ? read_portsc1() : read_portsc2(); - if (status & UHCI_PORTSC_CURRRENT_CONNECT_STATUS) + if (status & UHCI_PORTSC_CURRENT_CONNECT_STATUS) hub_port_status.status |= PORT_STATUS_CURRENT_CONNECT_STATUS; if (status & UHCI_PORTSC_CONNECT_STATUS_CHANGED) @@ -555,7 +555,7 @@ void UHCIController::reset_port(u8 port) VERIFY(port < NUMBER_OF_ROOT_PORTS); u16 port_data = port == 0 ? read_portsc1() : read_portsc2(); - port_data &= UCHI_PORTSC_NON_WRITE_CLEAR_BIT_MASK; + port_data &= UHCI_PORTSC_NON_WRITE_CLEAR_BIT_MASK; port_data |= UHCI_PORTSC_PORT_RESET; if (port == 0) write_portsc1(port_data); @@ -605,7 +605,7 @@ ErrorOr UHCIController::set_port_feature(Badge, u8 port, HubF break; case HubFeatureSelector::PORT_SUSPEND: { u16 port_data = port == 0 ? read_portsc1() : read_portsc2(); - port_data &= UCHI_PORTSC_NON_WRITE_CLEAR_BIT_MASK; + port_data &= UHCI_PORTSC_NON_WRITE_CLEAR_BIT_MASK; port_data |= UHCI_PORTSC_SUSPEND; if (port == 0) @@ -632,7 +632,7 @@ ErrorOr UHCIController::clear_port_feature(Badge, u8 port, Hu dbgln_if(UHCI_DEBUG, "UHCI: clear_port_feature: port={} feature_selector={}", port, (u8)feature_selector); u16 port_data = port == 0 ? read_portsc1() : read_portsc2(); - port_data &= UCHI_PORTSC_NON_WRITE_CLEAR_BIT_MASK; + port_data &= UHCI_PORTSC_NON_WRITE_CLEAR_BIT_MASK; switch (feature_selector) { case HubFeatureSelector::PORT_ENABLE: diff --git a/Kernel/FileSystem/Plan9FileSystem.cpp b/Kernel/FileSystem/Plan9FileSystem.cpp index efe6ac0dc55..5f447198b7a 100644 --- a/Kernel/FileSystem/Plan9FileSystem.cpp +++ b/Kernel/FileSystem/Plan9FileSystem.cpp @@ -730,16 +730,16 @@ ErrorOr Plan9FSInode::read_bytes(off_t offset, size_t size, UserOrKernel StringView data; // Try readlink first. - bool readlink_succeded = false; + bool readlink_succeeded = false; if (fs().m_remote_protocol_version >= Plan9FS::ProtocolVersion::v9P2000L && offset == 0) { message << fid(); if (auto result = fs().post_message_and_wait_for_a_reply(message); !result.is_error()) { - readlink_succeded = true; + readlink_succeeded = true; message >> data; } } - if (!readlink_succeded) { + if (!readlink_succeeded) { message = Plan9FS::Message { fs(), Plan9FS::Message::Type::Tread }; message << fid() << (u64)offset << (u32)size; TRY(fs().post_message_and_wait_for_a_reply(message)); diff --git a/Kernel/Firmware/BIOS.cpp b/Kernel/Firmware/BIOS.cpp index 3cb28bfe64b..65741330c58 100644 --- a/Kernel/Firmware/BIOS.cpp +++ b/Kernel/Firmware/BIOS.cpp @@ -86,7 +86,7 @@ UNMAP_AFTER_INIT void BIOSSysFSDirectory::set_dmi_32_bit_entry_initialization_va auto smbios_entry = Memory::map_typed(m_dmi_entry_point, SMBIOS_SEARCH_AREA_SIZE); m_smbios_structure_table = PhysicalAddress(smbios_entry.ptr()->legacy_structure.smbios_table_ptr); m_dmi_entry_point_length = smbios_entry.ptr()->length; - m_smbios_structure_table_length = smbios_entry.ptr()->legacy_structure.smboios_table_length; + m_smbios_structure_table_length = smbios_entry.ptr()->legacy_structure.smbios_table_length; } UNMAP_AFTER_INIT NonnullRefPtr BIOSSysFSDirectory::must_create(FirmwareSysFSDirectory& firmware_directory) diff --git a/Kernel/Firmware/BIOS.h b/Kernel/Firmware/BIOS.h index afa7b556f8d..297f5902153 100644 --- a/Kernel/Firmware/BIOS.h +++ b/Kernel/Firmware/BIOS.h @@ -23,7 +23,7 @@ namespace Kernel::SMBIOS { struct [[gnu::packed]] LegacyEntryPoint32bit { char legacy_sig[5]; u8 checksum2; - u16 smboios_table_length; + u16 smbios_table_length; u32 smbios_table_ptr; u16 smbios_tables_count; u8 smbios_bcd_revision; diff --git a/Kernel/Interrupts/PIC.cpp b/Kernel/Interrupts/PIC.cpp index 3f4524e0406..b8f29cdf648 100644 --- a/Kernel/Interrupts/PIC.cpp +++ b/Kernel/Interrupts/PIC.cpp @@ -161,7 +161,7 @@ void PIC::remap(u8 offset) IO::out8(PIC0_CTL, ICW1_INIT | ICW1_ICW4); IO::out8(PIC1_CTL, ICW1_INIT | ICW1_ICW4); - /* ICW2 (upper 5 bits specify ISR indices, lower 3 idunno) */ + /* ICW2 (upper 5 bits specify ISR indices, lower 3 don't specify anything) */ IO::out8(PIC0_CMD, offset); IO::out8(PIC1_CMD, offset + 0x08); @@ -188,7 +188,7 @@ UNMAP_AFTER_INIT void PIC::initialize() IO::out8(PIC0_CTL, ICW1_INIT | ICW1_ICW4); IO::out8(PIC1_CTL, ICW1_INIT | ICW1_ICW4); - /* ICW2 (upper 5 bits specify ISR indices, lower 3 idunno) */ + /* ICW2 (upper 5 bits specify ISR indices, lower 3 don't specify anything) */ IO::out8(PIC0_CMD, IRQ_VECTOR_BASE); IO::out8(PIC1_CMD, IRQ_VECTOR_BASE + 0x08); diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index b663f5957ca..de1f3957422 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -710,7 +710,7 @@ ErrorOr Process::send_signal(u8 signal, Process* sender) // If the main thread has died, there may still be other threads: if (!receiver_thread) { // The first one should be good enough. - // Neither kill(2) nor kill(3) specify any selection precedure. + // Neither kill(2) nor kill(3) specify any selection procedure. for_each_thread([&receiver_thread](Thread& thread) -> IterationDecision { receiver_thread = &thread; return IterationDecision::Break; diff --git a/Kernel/RTC.cpp b/Kernel/RTC.cpp index ebedb4deb2a..4b753bbf009 100644 --- a/Kernel/RTC.cpp +++ b/Kernel/RTC.cpp @@ -99,17 +99,17 @@ time_t now() }; unsigned year, month, day, hour, minute, second; - bool did_read_rtc_sucessfully = false; + bool did_read_rtc_successfully = false; for (size_t attempt = 0; attempt < 5; attempt++) { if (!try_to_read_registers(year, month, day, hour, minute, second)) break; if (check_registers_against_preloaded_values(year, month, day, hour, minute, second)) { - did_read_rtc_sucessfully = true; + did_read_rtc_successfully = true; break; } } - dmesgln("RTC: {} Year: {}, month: {}, day: {}, hour: {}, minute: {}, second: {}", (did_read_rtc_sucessfully ? "" : "(failed to read)"), year, month, day, hour, minute, second); + dmesgln("RTC: {} Year: {}, month: {}, day: {}, hour: {}, minute: {}, second: {}", (did_read_rtc_successfully ? "" : "(failed to read)"), year, month, day, hour, minute, second); time_t days_since_epoch = years_to_days_since_epoch(year) + day_of_year(year, month, day); return ((days_since_epoch * 24 + hour) * 60 + minute) * 60 + second; diff --git a/Kernel/Storage/Partition/MBRPartitionTable.cpp b/Kernel/Storage/Partition/MBRPartitionTable.cpp index cd773f3c052..3148b644bc3 100644 --- a/Kernel/Storage/Partition/MBRPartitionTable.cpp +++ b/Kernel/Storage/Partition/MBRPartitionTable.cpp @@ -19,7 +19,7 @@ Result, PartitionTable::Error> MBRPartitionTabl { auto table = make(device); if (table->contains_ebr()) - return { PartitionTable::Error::ConatinsEBR }; + return { PartitionTable::Error::ContainsEBR }; if (table->is_protective_mbr()) return { PartitionTable::Error::MBRProtective }; if (!table->is_valid()) diff --git a/Kernel/Storage/Partition/PartitionTable.h b/Kernel/Storage/Partition/PartitionTable.h index 575a61a5da8..89935e3c69f 100644 --- a/Kernel/Storage/Partition/PartitionTable.h +++ b/Kernel/Storage/Partition/PartitionTable.h @@ -19,7 +19,7 @@ public: enum class Error { Invalid, MBRProtective, - ConatinsEBR, + ContainsEBR, }; public: diff --git a/Kernel/Storage/StorageManagement.cpp b/Kernel/Storage/StorageManagement.cpp index 577a949b082..36536390562 100644 --- a/Kernel/Storage/StorageManagement.cpp +++ b/Kernel/Storage/StorageManagement.cpp @@ -101,7 +101,7 @@ UNMAP_AFTER_INIT OwnPtr StorageManagement::try_to_initialize_par return {}; return move(gpt_table_or_result.value()); } - if (mbr_table_or_result.error() == PartitionTable::Error::ConatinsEBR) { + if (mbr_table_or_result.error() == PartitionTable::Error::ContainsEBR) { auto ebr_table_or_result = EBRPartitionTable::try_to_initialize(device); if (ebr_table_or_result.is_error()) return {}; diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp index b7269bb0b2c..78b4bf42d14 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/WrapperGenerator.cpp @@ -1762,7 +1762,7 @@ JS::ThrowCompletionOr @class_name@::is_named_property_exposed_on_object(JS return false; // 2. If O has an own property named P, then return false. - // NOTE: This has to be done manually instead of using Object::has_own_property, as that would use the overrided internal_get_own_property. + // NOTE: This has to be done manually instead of using Object::has_own_property, as that would use the overridden internal_get_own_property. auto own_property_named_p = MUST(Object::internal_get_own_property(property_name)); if (own_property_named_p.has_value()) @@ -2198,7 +2198,7 @@ JS::ThrowCompletionOr @class_name@::internal_define_own_property(JS::Prope // 2. If O implements an interface with the [LegacyOverrideBuiltIns] extended attribute or O does not have an own property named P, then: if (!interface.extended_attributes.contains("LegacyOverrideBuiltIns")) { scoped_generator.append(R"~~~( - // NOTE: This has to be done manually instead of using Object::has_own_property, as that would use the overrided internal_get_own_property. + // NOTE: This has to be done manually instead of using Object::has_own_property, as that would use the overridden internal_get_own_property. auto own_property_named_p = TRY(Object::internal_get_own_property(property_name)); if (!own_property_named_p.has_value()))~~~"); diff --git a/Tests/LibRegex/Regex.cpp b/Tests/LibRegex/Regex.cpp index b6d44acc5d1..8b705eb978e 100644 --- a/Tests/LibRegex/Regex.cpp +++ b/Tests/LibRegex/Regex.cpp @@ -908,8 +908,8 @@ TEST_CASE(optimizer_atomic_groups) Tuple { "(abcfoo|abcbar|abcbaz).*x"sv, "abcbarx"sv, true }, Tuple { "(a|a)"sv, "a"sv, true }, Tuple { "(a|)"sv, ""sv, true }, // Ensure that empty alternatives are not outright removed - Tuple { "a{2,3}|a{5,8}"sv, "abc"sv, false }, // Optimiser should not mess up the instruction stream by ignoring inter-insn dependencies, see #11247. - Tuple { "^(a{2,3}|a{5,8})$"sv, "aaaa"sv, false }, // Optimiser should not mess up the instruction stream by ignoring inter-insn dependencies, see #11247. + Tuple { "a{2,3}|a{5,8}"sv, "abc"sv, false }, // Optimizer should not mess up the instruction stream by ignoring inter-insn dependencies, see #11247. + Tuple { "^(a{2,3}|a{5,8})$"sv, "aaaa"sv, false }, // Optimizer should not mess up the instruction stream by ignoring inter-insn dependencies, see #11247. // ForkReplace shouldn't be applied where it would change the semantics Tuple { "(1+)\\1"sv, "11"sv, true }, Tuple { "(1+)1"sv, "11"sv, true }, diff --git a/Userland/Demos/Fire/Fire.cpp b/Userland/Demos/Fire/Fire.cpp index 456712dbc27..2f67491e333 100644 --- a/Userland/Demos/Fire/Fire.cpp +++ b/Userland/Demos/Fire/Fire.cpp @@ -20,7 +20,7 @@ * [ ] switch to use tsc values for perf check * [ ] handle mouse events differently for smoother painting (queue) * [ ] handle fire bitmap edges better -*/ + */ #include #include @@ -107,7 +107,7 @@ Fire::Fire() bitmap->scanline_u8(bitmap->height() - 1)[i] = FIRE_MAX; /* Set off initital paint event */ - //update(); + // update(); } Fire::~Fire() @@ -134,7 +134,7 @@ void Fire::timer_event(Core::TimerEvent&) if (phase > 1) phase = 0; - /* Paint our palettized buffer to screen */ + /* Paint our palletized buffer to screen */ for (int px = 0 + phase; px < FIRE_WIDTH; px += 2) { for (int py = 1; py < FIRE_HEIGHT; py++) { int rnd = rand() % 3; diff --git a/Userland/DevTools/HackStudio/LanguageClient.cpp b/Userland/DevTools/HackStudio/LanguageClient.cpp index bfe87b1711f..3b5f4647e73 100644 --- a/Userland/DevTools/HackStudio/LanguageClient.cpp +++ b/Userland/DevTools/HackStudio/LanguageClient.cpp @@ -176,13 +176,13 @@ void ServerConnectionWrapper::on_crash() dbgln("LanguageServer crash frequency is too high"); m_respawn_allowed = false; - show_frequenct_crashes_notification(); + show_frequent_crashes_notification(); } else { m_last_crash_timer.start(); try_respawn_connection(); } } -void ServerConnectionWrapper::show_frequenct_crashes_notification() const +void ServerConnectionWrapper::show_frequent_crashes_notification() const { auto notification = GUI::Notification::construct(); notification->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/32x32/app-hack-studio.png").release_value_but_fixme_should_propagate_errors()); diff --git a/Userland/DevTools/HackStudio/LanguageClient.h b/Userland/DevTools/HackStudio/LanguageClient.h index aaa4b6f3c6f..75eab5f0d8a 100644 --- a/Userland/DevTools/HackStudio/LanguageClient.h +++ b/Userland/DevTools/HackStudio/LanguageClient.h @@ -78,7 +78,7 @@ public: private: void create_connection(); void show_crash_notification() const; - void show_frequenct_crashes_notification() const; + void show_frequent_crashes_notification() const; Language m_language; Function()> m_connection_creator; diff --git a/Userland/Libraries/LibAudio/FlacLoader.cpp b/Userland/Libraries/LibAudio/FlacLoader.cpp index 4aa3cdf0291..03a0d83b94b 100644 --- a/Userland/Libraries/LibAudio/FlacLoader.cpp +++ b/Userland/Libraries/LibAudio/FlacLoader.cpp @@ -366,10 +366,10 @@ MaybeLoaderError FlacLoaderPlugin::next_frame(Span target_vector) Sample frame = { left[i] / sample_rescale, right[i] / sample_rescale }; target_vector[i] = frame; } - // move superflous data into the class buffer instead + // move superfluous data into the class buffer instead auto result = m_unread_data.try_grow_capacity(m_current_frame->sample_count - samples_to_directly_copy); if (result.is_error()) - return LoaderError { LoaderError::Category::Internal, static_cast(samples_to_directly_copy + m_current_sample_or_frame), "Couldn't allocate sample buffer for superflous data" }; + return LoaderError { LoaderError::Category::Internal, static_cast(samples_to_directly_copy + m_current_sample_or_frame), "Couldn't allocate sample buffer for superfluous data" }; for (size_t i = samples_to_directly_copy; i < m_current_frame->sample_count; ++i) { Sample frame = { left[i] / sample_rescale, right[i] / sample_rescale }; @@ -630,7 +630,7 @@ ErrorOr, LoaderError> FlacLoaderPlugin::decode_custom_lpc(FlacSubfra for (size_t t = 0; t < subframe.order; ++t) { // It's really important that we compute in 64-bit land here. // Even though FLAC operates at a maximum bit depth of 32 bits, modern encoders use super-large coefficients for maximum compression. - // These will easily overflow 32 bits and cause strange white noise that apruptly stops intermittently (at the end of a frame). + // These will easily overflow 32 bits and cause strange white noise that abruptly stops intermittently (at the end of a frame). // The simple fix of course is to do intermediate computations in 64 bits. sample += static_cast(coefficients[t]) * static_cast(decoded[i - t - 1]); } diff --git a/Userland/Libraries/LibCompress/Deflate.cpp b/Userland/Libraries/LibCompress/Deflate.cpp index 0b320d16283..a4e0bcedbe4 100644 --- a/Userland/Libraries/LibCompress/Deflate.cpp +++ b/Userland/Libraries/LibCompress/Deflate.cpp @@ -180,10 +180,10 @@ bool DeflateDecompressor::UncompressedBlock::try_read_more() if (m_bytes_remaining == 0) return false; - const auto nread = min(m_bytes_remaining, m_decompressor.m_output_stream.remaining_contigous_space()); + const auto nread = min(m_bytes_remaining, m_decompressor.m_output_stream.remaining_contiguous_space()); m_bytes_remaining -= nread; - m_decompressor.m_input_stream >> m_decompressor.m_output_stream.reserve_contigous_space(nread); + m_decompressor.m_input_stream >> m_decompressor.m_output_stream.reserve_contiguous_space(nread); return true; } diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index 09fc1394c81..66ce7efe871 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -435,7 +435,7 @@ size_t EventLoop::pump(WaitMode mode) void EventLoop::post_event(Object& receiver, NonnullOwnPtr&& event) { Threading::MutexLocker lock(m_private->lock); - dbgln_if(EVENTLOOP_DEBUG, "Core::EventLoop::post_event: ({}) << receivier={}, event={}", m_queued_events.size(), receiver, event); + dbgln_if(EVENTLOOP_DEBUG, "Core::EventLoop::post_event: ({}) << receiver={}, event={}", m_queued_events.size(), receiver, event); m_queued_events.empend(receiver, move(event)); } @@ -522,7 +522,7 @@ void EventLoop::handle_signal(int signo) VERIFY(signo != 0); // We MUST check if the current pid still matches, because there // is a window between fork() and exec() where a signal delivered - // to our fork could be inadvertedly routed to the parent process! + // to our fork could be inadvertently routed to the parent process! if (getpid() == s_pid) { int nwritten = write(s_wake_pipe_fds[1], &signo, sizeof(signo)); if (nwritten < 0) { diff --git a/Userland/Libraries/LibCrypto/ASN1/ASN1.cpp b/Userland/Libraries/LibCrypto/ASN1/ASN1.cpp index aff3ae91e55..7fc07b1ca99 100644 --- a/Userland/Libraries/LibCrypto/ASN1/ASN1.cpp +++ b/Userland/Libraries/LibCrypto/ASN1/ASN1.cpp @@ -183,7 +183,7 @@ done_parsing:; if (offset_hours.has_value() || offset_minutes.has_value()) dbgln("FIXME: Implement GeneralizedTime with offset!"); - // Unceremonially drop the milliseconds on the floor. + // Unceremoniously drop the milliseconds on the floor. return Core::DateTime::create(year.value(), month.value(), day.value(), hour.value(), minute.value_or(0), seconds.value_or(0)); } diff --git a/Userland/Libraries/LibCrypto/ASN1/DER.cpp b/Userland/Libraries/LibCrypto/ASN1/DER.cpp index 76da1a3e9aa..9f3b51f1606 100644 --- a/Userland/Libraries/LibCrypto/ASN1/DER.cpp +++ b/Userland/Libraries/LibCrypto/ASN1/DER.cpp @@ -383,7 +383,7 @@ void pretty_print(Decoder& decoder, OutputStream& stream, int indent) } case Kind::Sequence: case Kind::Set: - dbgln("Seq/Sequence PrettyPrint error: Unexpected Primtive"); + dbgln("Seq/Sequence PrettyPrint error: Unexpected Primitive"); return; } } diff --git a/Userland/Libraries/LibCrypto/BigInt/Algorithms/ModularPower.cpp b/Userland/Libraries/LibCrypto/BigInt/Algorithms/ModularPower.cpp index 258f96b7504..34e65c6fbbe 100644 --- a/Userland/Libraries/LibCrypto/BigInt/Algorithms/ModularPower.cpp +++ b/Userland/Libraries/LibCrypto/BigInt/Algorithms/ModularPower.cpp @@ -142,7 +142,7 @@ void UnsignedBigIntegerAlgorithms::almost_montgomery_multiplication_without_allo UnsignedBigInteger::Word t = z.m_words[i] * k; UnsignedBigInteger::Word carry_2 = montgomery_fragment(z, i, modulo, t, num_words); - // Compute the carry by combining all of the carrys of the previous computations + // Compute the carry by combining all of the carries of the previous computations // Put it "right after" the range that we computed above UnsignedBigInteger::Word temp_carry = previous_double_carry + carry_1; UnsignedBigInteger::Word overall_carry = temp_carry + carry_2; diff --git a/Userland/Libraries/LibDebug/DebugSession.cpp b/Userland/Libraries/LibDebug/DebugSession.cpp index b715a1620d0..7e19c8e1b7c 100644 --- a/Userland/Libraries/LibDebug/DebugSession.cpp +++ b/Userland/Libraries/LibDebug/DebugSession.cpp @@ -104,7 +104,7 @@ OwnPtr DebugSession::exec_and_attach(String const& command, return {}; } - // We want to continue until the exit from the 'execve' sycsall. + // We want to continue until the exit from the 'execve' syscall. // This ensures that when we start debugging the process // it executes the target image, and not the forked image of the tracing process. // NOTE: we only need to do this when we are debugging a new process (i.e not attaching to a process that's already running!) diff --git a/Userland/Libraries/LibDebug/DebugSession.h b/Userland/Libraries/LibDebug/DebugSession.h index eaffaa82c49..6b8d5850b5b 100644 --- a/Userland/Libraries/LibDebug/DebugSession.h +++ b/Userland/Libraries/LibDebug/DebugSession.h @@ -144,7 +144,7 @@ private: HashMap m_breakpoints; HashMap m_watchpoints; - // Maps from library name to LoadedLibrary obect + // Maps from library name to LoadedLibrary object HashMap> m_loaded_libraries; }; @@ -245,7 +245,7 @@ void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callbac if (current_breakpoint.has_value()) { // We want to make the breakpoint transparent to the user of the debugger. // To achieve this, we perform two rollbacks: - // 1. Set regs.eip to point at the actual address of the instruction we breaked on. + // 1. Set regs.eip to point at the actual address of the instruction we broke on. // regs.eip currently points to one byte after the address of the original instruction, // because the cpu has just executed the INT3 we patched into the instruction. // 2. We restore the original first byte of the instruction, @@ -285,9 +285,9 @@ void DebugSession::run(DesiredInitialDebugeeState initial_debugee_state, Callbac // To re-enable the breakpoint, we first perform a single step and execute the // instruction of the breakpoint, and then redo the INT3 patch in its first byte. - // If the user manually inserted a breakpoint at were we breaked at originally, - // we need to disable that breakpoint because we want to singlestep over it to execute the - // instruction we breaked on (we re-enable it again later anyways). + // If the user manually inserted a breakpoint at the current instruction, + // we need to disable that breakpoint because we want to singlestep over that + // instruction (we re-enable it again later anyways). if (m_breakpoints.contains(current_breakpoint.value().address) && m_breakpoints.get(current_breakpoint.value().address).value().state == BreakPointState::Enabled) { disable_breakpoint(current_breakpoint.value().address); } diff --git a/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp b/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp index df1c50b3946..d30cbac173d 100644 --- a/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp +++ b/Userland/Libraries/LibDebug/Dwarf/LineProgram.cpp @@ -247,7 +247,7 @@ void LineProgram::handle_standard_opcode(u8 opcode) m_basic_block = true; break; } - case StandardOpcodes::SetProlougeEnd: { + case StandardOpcodes::SetPrologueEnd: { m_prologue_end = true; break; } diff --git a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h index b90b10d948c..85e5e3ffdc2 100644 --- a/Userland/Libraries/LibDebug/Dwarf/LineProgram.h +++ b/Userland/Libraries/LibDebug/Dwarf/LineProgram.h @@ -153,7 +153,7 @@ private: SetBasicBlock, ConstAddPc, FixAdvancePc, - SetProlougeEnd, + SetPrologueEnd, SetEpilogueBegin, SetIsa }; diff --git a/Userland/Libraries/LibGfx/PNGLoader.cpp b/Userland/Libraries/LibGfx/PNGLoader.cpp index cfabcfbc826..ca3e0931de7 100644 --- a/Userland/Libraries/LibGfx/PNGLoader.cpp +++ b/Userland/Libraries/LibGfx/PNGLoader.cpp @@ -714,7 +714,7 @@ static ErrorOr decode_png_bitmap(PNGLoadingContext& context) return Error::from_string_literal("PNGImageDecoderPlugin: Didn't see an IHDR chunk."sv); if (context.color_type == 3 && context.palette_data.is_empty()) - return Error::from_string_literal("PNGImageDecoderPlugin: Didn't see a PLTE chunk for a palettized image, or it was empty."sv); + return Error::from_string_literal("PNGImageDecoderPlugin: Didn't see a PLTE chunk for a palletized image, or it was empty."sv); auto result = Compress::Zlib::decompress_all(context.compressed_data.span()); if (!result.has_value()) { diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp index b39cda72f4e..9919c0bab10 100644 --- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp +++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp @@ -1164,7 +1164,7 @@ void TryStatement::generate_bytecode(Bytecode::Generator& generator) const } }, [&](NonnullRefPtr const&) { - // FIXME: Implement this path when the above DeclrativeEnvironment issue is dealt with. + // FIXME: Implement this path when the above DeclarativeEnvironment issue is dealt with. TODO(); }); diff --git a/Userland/Libraries/LibTLS/Certificate.cpp b/Userland/Libraries/LibTLS/Certificate.cpp index 467a283c150..91e213831cb 100644 --- a/Userland/Libraries/LibTLS/Certificate.cpp +++ b/Userland/Libraries/LibTLS/Certificate.cpp @@ -106,8 +106,8 @@ Optional Certificate::parse_asn1(ReadonlyBytes buffer, bool) // validity Validity, // subject Name, // subject_public_key_info SubjectPublicKeyInfo, - // issuer_unique_id (1) IMPLICIT UniqueIdentifer OPTIONAL (if present, version > v1), - // subject_unique_id (2) IMPLICIT UniqueIdentiier OPTIONAL (if present, version > v1), + // issuer_unique_id (1) IMPLICIT UniqueIdentifier OPTIONAL (if present, version > v1), + // subject_unique_id (2) IMPLICIT UniqueIdentifier OPTIONAL (if present, version > v1), // extensions (3) EXPLICIT Extensions OPTIONAL (if present, version > v2) // } ENTER_SCOPE_OR_FAIL(Sequence, "Certificate::TBSCertificate"); @@ -413,7 +413,7 @@ Optional Certificate::parse_asn1(ReadonlyBytes buffer, bool) case 3: // x400Address // We don't know how to use this. - DROP_OBJECT_OR_FAIL("Certificate::TBSCertificate::Extensions::$::Extension::extension_value::SubjectAlternativeName::$::X400Adress"); + DROP_OBJECT_OR_FAIL("Certificate::TBSCertificate::Extensions::$::Extension::extension_value::SubjectAlternativeName::$::X400Address"); break; case 4: // Directory name diff --git a/Userland/Libraries/LibTLS/Record.cpp b/Userland/Libraries/LibTLS/Record.cpp index b38ad699458..1bce5a0f12f 100644 --- a/Userland/Libraries/LibTLS/Record.cpp +++ b/Userland/Libraries/LibTLS/Record.cpp @@ -187,7 +187,7 @@ void TLSv12::update_packet(ByteBuffer& packet) // copy the header over ct.overwrite(0, packet.data(), header_size - 2); - // get the appropricate HMAC value for the entire packet + // get the appropriate HMAC value for the entire packet auto mac = hmac_message(packet, {}, mac_size, true); // write the MAC diff --git a/Userland/Libraries/LibTLS/TLSv12.cpp b/Userland/Libraries/LibTLS/TLSv12.cpp index dac8e38b596..e8c35a2a6cf 100644 --- a/Userland/Libraries/LibTLS/TLSv12.cpp +++ b/Userland/Libraries/LibTLS/TLSv12.cpp @@ -174,7 +174,7 @@ void TLSv12::try_disambiguate_error() const void TLSv12::set_root_certificates(Vector certificates) { - if (!m_context.root_ceritificates.is_empty()) + if (!m_context.root_certificates.is_empty()) dbgln("TLS warn: resetting root certificates!"); for (auto& cert : certificates) { @@ -182,7 +182,7 @@ void TLSv12::set_root_certificates(Vector certificates) dbgln("Certificate for {} by {} is invalid, things may or may not work!", cert.subject.subject, cert.issuer.subject); // FIXME: Figure out what we should do when our root certs are invalid. } - m_context.root_ceritificates = move(certificates); + m_context.root_certificates = move(certificates); } bool Context::verify_chain() const @@ -202,7 +202,7 @@ bool Context::verify_chain() const HashMap chain; HashTable roots; // First, walk the root certs. - for (auto& cert : root_ceritificates) { + for (auto& cert : root_certificates) { roots.set(cert.subject.subject); chain.set(cert.subject.subject, cert.issuer.subject); } diff --git a/Userland/Libraries/LibTLS/TLSv12.h b/Userland/Libraries/LibTLS/TLSv12.h index 2ef51f0e4a6..2d82cf00bcf 100644 --- a/Userland/Libraries/LibTLS/TLSv12.h +++ b/Userland/Libraries/LibTLS/TLSv12.h @@ -295,7 +295,7 @@ struct Context { // message flags u8 handshake_messages[11] { 0 }; ByteBuffer user_data; - Vector root_ceritificates; + Vector root_certificates; Vector alpn; StringView negotiated_alpn; diff --git a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp index 5017916d882..9459806bdc4 100644 --- a/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp +++ b/Userland/Libraries/LibWasm/AbstractMachine/BytecodeInterpreter.cpp @@ -245,7 +245,7 @@ void BytecodeInterpreter::store_to_memory(Configuration& configuration, Instruct dbgln("LibWasm: Memory access out of bounds (expected 0 <= {} and {} <= {})", instance_address, instance_address + data.size(), memory->size()); return; } - dbgln_if(WASM_TRACE_DEBUG, "tempoaray({}b) -> store({})", data.size(), instance_address); + dbgln_if(WASM_TRACE_DEBUG, "temporary({}b) -> store({})", data.size(), instance_address); data.copy_to(memory->data().bytes().slice(instance_address, data.size())); } diff --git a/Userland/Libraries/LibWasm/Parser/Parser.cpp b/Userland/Libraries/LibWasm/Parser/Parser.cpp index 19558070c8e..dbf4b3f3450 100644 --- a/Userland/Libraries/LibWasm/Parser/Parser.cpp +++ b/Userland/Libraries/LibWasm/Parser/Parser.cpp @@ -849,10 +849,10 @@ ParseResult MemorySection::Memory::parse(InputStream& str ParseResult MemorySection::parse(InputStream& stream) { ScopeLogger logger("MemorySection"); - auto memorys = parse_vector(stream); - if (memorys.is_error()) - return memorys.error(); - return MemorySection { memorys.release_value() }; + auto memories = parse_vector(stream); + if (memories.is_error()) + return memories.error(); + return MemorySection { memories.release_value() }; } ParseResult Expression::parse(InputStream& stream) diff --git a/Userland/Libraries/LibWasm/Types.h b/Userland/Libraries/LibWasm/Types.h index 4677be889cd..6aeb7dbf235 100644 --- a/Userland/Libraries/LibWasm/Types.h +++ b/Userland/Libraries/LibWasm/Types.h @@ -619,8 +619,8 @@ public: public: static constexpr u8 section_id = 5; - explicit MemorySection(Vector memorys) - : m_memories(move(memorys)) + explicit MemorySection(Vector memories) + : m_memories(move(memories)) { } diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index e4638d230fc..3da8bc651d0 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -1038,7 +1038,7 @@ void WindowManager::start_menu_doubleclick(Window& window, MouseEvent const& eve // This is a special case. Basically, we're trying to determine whether // double clicking on the window menu icon happened. In this case, the // WindowFrame only receives a MouseDown event, and since the window - // menu popus up, it does not see the MouseUp event. But, if they subsequently + // menu pops up, it does not see the MouseUp event. But, if they subsequently // click there again, the menu is closed and we receive a MouseUp event. // So, in order to be able to detect a double click when a menu is being // opened by the MouseDown event, we need to consider the MouseDown event