From 70357c4f6e6448e53d24fa5738fb1f899d54500b Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 7 Aug 2024 09:42:35 +0200 Subject: [PATCH] Add back .clang-format --- .clang-format | 8 ++++++++ src/libc.c | 8 +++++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .clang-format 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;