1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:57:45 +00:00

Everywhere: Run clang-format

The following command was used to clang-format these files:

    clang-format-16 -i $(find . \
        -not \( -path "./\.*" -prune \) \
        -not \( -path "./Base/*" -prune \) \
        -not \( -path "./Build/*" -prune \) \
        -not \( -path "./Toolchain/*" -prune \) \
        -not \( -path "./Ports/*" -prune \) \
        -type f -name "*.cpp" -o -name "*.h")
This commit is contained in:
Timothy Flynn 2023-07-07 22:44:33 -04:00 committed by Linus Groh
parent 388d455575
commit aff81d318b
17 changed files with 49 additions and 54 deletions

View file

@ -31,8 +31,7 @@ enum class InterruptsState;
// FIXME This needs to go behind some sort of platform abstraction
// it is used between Thread and Processor.
struct [[gnu::aligned(16)]] FPUState
{
struct [[gnu::aligned(16)]] FPUState {
u8 buffer[512];
};

View file

@ -45,8 +45,7 @@ extern "C" void thread_context_first_enter(void);
extern "C" void exit_kernel_thread(void);
extern "C" void do_assume_context(Thread* thread, u32 flags);
struct [[gnu::aligned(64), gnu::packed]] FPUState
{
struct [[gnu::aligned(64), gnu::packed]] FPUState {
SIMD::LegacyRegion legacy_region;
SIMD::Header xsave_header;

View file

@ -71,7 +71,7 @@ protected:
{
VERIFY(b.blocker_type() == Thread::Blocker::Type::Routing);
auto& blocker = static_cast<ARPTableBlocker&>(b);
auto maybe_mac_address = arp_table().with([&](auto const& table) -> auto{
auto maybe_mac_address = arp_table().with([&](auto const& table) -> auto {
return table.get(blocker.ip_address());
});
if (!maybe_mac_address.has_value())
@ -95,7 +95,7 @@ bool ARPTableBlocker::setup_blocker()
void ARPTableBlocker::will_unblock_immediately_without_blocking(UnblockImmediatelyReason)
{
auto addr = arp_table().with([&](auto const& table) -> auto{
auto addr = arp_table().with([&](auto const& table) -> auto {
return table.get(ip_address());
});
@ -297,11 +297,11 @@ RoutingDecision route_to(IPv4Address const& target, IPv4Address const& source, R
if (adapter == NetworkingManagement::the().loopback_adapter())
return { adapter, adapter->mac_address() };
if ((target_addr & IPv4Address { 240, 0, 0, 0 }.to_u32()) == IPv4Address { 224, 0, 0, 0 }.to_u32())
if ((target_addr & (IPv4Address { 240, 0, 0, 0 }.to_u32())) == IPv4Address { 224, 0, 0, 0 }.to_u32())
return { adapter, multicast_ethernet_address(target) };
{
auto addr = arp_table().with([&](auto const& table) -> auto{
auto addr = arp_table().with([&](auto const& table) -> auto {
return table.get(next_hop_ip);
});
if (addr.has_value()) {

View file

@ -20,8 +20,8 @@ namespace Kernel {
namespace Syscall {
using Handler = auto(Process::*)(FlatPtr, FlatPtr, FlatPtr, FlatPtr) -> ErrorOr<FlatPtr>;
using HandlerWithRegisterState = auto(Process::*)(RegisterState&) -> ErrorOr<FlatPtr>;
using Handler = auto (Process::*)(FlatPtr, FlatPtr, FlatPtr, FlatPtr) -> ErrorOr<FlatPtr>;
using HandlerWithRegisterState = auto (Process::*)(RegisterState&) -> ErrorOr<FlatPtr>;
struct HandlerMetadata {
Handler handler;