1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:27:44 +00:00

UserspaceEmulator: Add some implied auto qualifiers

This commit is contained in:
Hendiadyoin1 2021-12-22 16:20:22 +01:00 committed by Brian Gianforcaro
parent bf714efa41
commit 15daae468b
5 changed files with 10 additions and 10 deletions

View file

@ -27,8 +27,8 @@ static void free_pages(void* ptr, size_t bytes)
NonnullOwnPtr<MmapRegion> MmapRegion::create_anonymous(u32 base, u32 size, u32 prot, String name)
{
auto data = (u8*)mmap_initialized(size, 0, String::formatted("(UE) {}", name).characters());
auto shadow_data = (u8*)mmap_initialized(size, 1, "MmapRegion ShadowData");
auto* data = (u8*)mmap_initialized(size, 0, String::formatted("(UE) {}", name).characters());
auto* shadow_data = (u8*)mmap_initialized(size, 1, "MmapRegion ShadowData");
auto region = adopt_own(*new MmapRegion(base, size, prot, data, shadow_data));
region->m_name = move(name);
return region;
@ -38,9 +38,9 @@ NonnullOwnPtr<MmapRegion> MmapRegion::create_file_backed(u32 base, u32 size, u32
{
// Since we put the memory to an arbitrary location, do not pass MAP_FIXED to the Kernel.
auto real_flags = flags & ~MAP_FIXED;
auto data = (u8*)mmap_with_name(nullptr, size, prot, real_flags, fd, offset, name.is_empty() ? nullptr : String::formatted("(UE) {}", name).characters());
auto* data = (u8*)mmap_with_name(nullptr, size, prot, real_flags, fd, offset, name.is_empty() ? nullptr : String::formatted("(UE) {}", name).characters());
VERIFY(data != MAP_FAILED);
auto shadow_data = (u8*)mmap_initialized(size, 1, "MmapRegion ShadowData");
auto* shadow_data = (u8*)mmap_initialized(size, 1, "MmapRegion ShadowData");
auto region = adopt_own(*new MmapRegion(base, size, prot, data, shadow_data));
region->m_file_backed = true;
region->m_name = move(name);