diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..d154da600 --- /dev/null +++ b/.clang-format @@ -0,0 +1,8 @@ +# Use the Google style with these modifications: +# +# 1) lines can be up to 100 chars long rather than 80, and +# 2) use a four space indent rather than two spaces. +# +BasedOnStyle: Google +ColumnLimit: 100 +IndentWidth: 4 diff --git a/src/libc.c b/src/libc.c index a94682fef..cee3501fb 100644 --- a/src/libc.c +++ b/src/libc.c @@ -185,8 +185,9 @@ int C_RLIMIT_NTHR() { #endif } -bool C_readdir64(DIR* dirp, const char** d_name, size_t* d_name_len, uint64_t* d_ino, unsigned char* d_type) { - struct dirent *dent = readdir(dirp); +bool C_readdir64(DIR* dirp, const char** d_name, size_t* d_name_len, uint64_t* d_ino, + unsigned char* d_type) { + struct dirent* dent = readdir(dirp); if (!dent) { return false; } @@ -201,7 +202,8 @@ bool C_readdir64(DIR* dirp, const char** d_name, size_t* d_name_len, uint64_t* d return true; } -bool C_fstatat64(int dirfd, const char* file, int flag, uint64_t* st_dev, uint64_t* st_ino, mode_t* st_mode) { +bool C_fstatat64(int dirfd, const char* file, int flag, uint64_t* st_dev, uint64_t* st_ino, + mode_t* st_mode) { struct stat buf; if (fstatat(dirfd, file, &buf, flag) == -1) { return false;