mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 05:24:58 +00:00
Add clang-format file
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
This commit is contained in:
parent
c11351ac50
commit
0dc9af5f7e
286 changed files with 3244 additions and 2424 deletions
|
@ -1,9 +1,9 @@
|
|||
#include <AK/MappedFile.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//#define DEBUG_MAPPED_FILE
|
||||
|
||||
|
@ -14,7 +14,7 @@ MappedFile::MappedFile(const String& file_name)
|
|||
{
|
||||
m_size = PAGE_SIZE;
|
||||
m_fd = open(m_file_name.characters(), O_RDONLY | O_CLOEXEC);
|
||||
|
||||
|
||||
if (m_fd != -1) {
|
||||
struct stat st;
|
||||
fstat(m_fd, &st);
|
||||
|
@ -44,7 +44,7 @@ void MappedFile::unmap()
|
|||
ASSERT(rc == 0);
|
||||
rc = close(m_fd);
|
||||
ASSERT(rc == 0);
|
||||
m_file_name = { };
|
||||
m_file_name = {};
|
||||
m_size = 0;
|
||||
m_fd = -1;
|
||||
m_map = (void*)-1;
|
||||
|
@ -74,4 +74,3 @@ MappedFile& MappedFile::operator=(MappedFile&& other)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue