1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:47:46 +00:00

Meta+Kernel: Make clang-format-10 clean

This commit is contained in:
Ben Wiederhake 2020-09-18 09:49:51 +02:00 committed by Andreas Kling
parent fa62c5595e
commit 64cc3f51d0
61 changed files with 123 additions and 118 deletions

View file

@ -39,8 +39,8 @@ struct ICMPType {
class [[gnu::packed]] ICMPHeader
{
public:
ICMPHeader() {}
~ICMPHeader() {}
ICMPHeader() { }
~ICMPHeader() { }
u8 type() const { return m_type; }
void set_type(u8 b) { m_type = b; }

View file

@ -352,7 +352,7 @@ KResultOr<size_t> IPv4Socket::receive_packet_buffered(FileDescription& descripti
}
if (type() == SOCK_RAW) {
size_t bytes_written = min((size_t) ipv4_packet.payload_size(), buffer_length);
size_t bytes_written = min((size_t)ipv4_packet.payload_size(), buffer_length);
if (!buffer.write(ipv4_packet.payload(), bytes_written))
return KResult(-EFAULT);
return bytes_written;

View file

@ -125,7 +125,7 @@ int NetworkAdapter::send_ipv4(const MACAddress& destination_mac, const IPv4Addre
ipv4.set_checksum(ipv4.compute_checksum());
m_packets_out++;
m_bytes_out += ethernet_frame_size;
if (!payload.read(ipv4.payload(), payload_size))
return -EFAULT;
send_raw({ (const u8*)&eth, ethernet_frame_size });

View file

@ -44,8 +44,8 @@ struct TCPFlags {
class [[gnu::packed]] TCPPacket
{
public:
TCPPacket() {}
~TCPPacket() {}
TCPPacket() { }
~TCPPacket() { }
size_t header_size() const { return data_offset() * sizeof(u32); }

View file

@ -33,8 +33,8 @@ namespace Kernel {
class [[gnu::packed]] UDPPacket
{
public:
UDPPacket() {}
~UDPPacket() {}
UDPPacket() { }
~UDPPacket() { }
u16 source_port() const { return m_source_port; }
void set_source_port(u16 port) { m_source_port = port; }