mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
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.
This commit is contained in:
parent
a3ee35510f
commit
cbfa211988
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue