summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-01 11:38:15 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-01 11:38:15 +0200
commitcbfa211988cd0baeeb5f095488be28a745b94389 (patch)
tree9d39d79dba41e8757acb50df0877012d0d347d55 /Kernel
parenta3ee35510f97d596e54df32c17ffe8f804e38a45 (diff)
downloadserenity-cbfa211988cd0baeeb5f095488be28a745b94389.zip
ProcFS: Align the buffer used for the CPUID brand string.
I'm not sure if this actually matters, but it won't hurt anyone to use a 32-bit aligned buffer here. Found by PVS-Studio.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/FileSystem/ProcFS.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp
index 93e717c49f..cac78f79af 100644
--- a/Kernel/FileSystem/ProcFS.cpp
+++ b/Kernel/FileSystem/ProcFS.cpp
@@ -478,7 +478,7 @@ ByteBuffer procfs$cpuinfo(InodeIdentifier)
{
// FIXME: Check first that this is supported by calling CPUID with eax=0x80000000
// and verifying that the returned eax>=0x80000004.
- char buffer[48];
+ alignas(u32) char buffer[48];
u32* bufptr = reinterpret_cast<u32*>(buffer);
auto copy_brand_string_part_to_buffer = [&](u32 i) {
CPUID cpuid(0x80000002 + i);