Add back .clang-format

This commit is contained in:
Johannes Altmanninger 2024-08-07 09:42:35 +02:00
parent 338579b78c
commit 70357c4f6e
2 changed files with 13 additions and 3 deletions

8
.clang-format Normal file
View file

@ -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

View file

@ -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;