summaryrefslogtreecommitdiff
path: root/Kernel/Net/RTL8168NetworkAdapter.h
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-09-05 00:57:53 -0700
committerAndreas Kling <kling@serenityos.org>2021-09-05 20:08:57 +0200
commit472454cdeda1ab87e879670f44993960013973ff (patch)
treead8c5c51d9ce3fcab18579f573aa35dd8c2a22a2 /Kernel/Net/RTL8168NetworkAdapter.h
parent112de58fe0601ef95544ab474f35ade14f947391 (diff)
downloadserenity-472454cdeda1ab87e879670f44993960013973ff.zip
Kernel: Switch static_asserts of a type size to AK::AssertSize
This will provide better debug ability when the size comparison fails.
Diffstat (limited to 'Kernel/Net/RTL8168NetworkAdapter.h')
-rw-r--r--Kernel/Net/RTL8168NetworkAdapter.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/RTL8168NetworkAdapter.h b/Kernel/Net/RTL8168NetworkAdapter.h
index 713ca32503..c893270cb6 100644
--- a/Kernel/Net/RTL8168NetworkAdapter.h
+++ b/Kernel/Net/RTL8168NetworkAdapter.h
@@ -59,7 +59,7 @@ private:
static constexpr u16 LargeSend = 0x800u;
};
- static_assert(sizeof(TXDescriptor) == 16u);
+ static_assert(AssertSize<TXDescriptor, 16u>());
struct [[gnu::packed]] RXDescriptor {
volatile u16 buffer_size; // top 2 bits are reserved
@@ -83,7 +83,7 @@ private:
static constexpr u16 CRCError = 0x8;
};
- static_assert(sizeof(RXDescriptor) == 16u);
+ static_assert(AssertSize<RXDescriptor, 16u>());
enum class ChipVersion : u8 {
Unknown = 0,