diff options
author | Linus Groh <mail@linusgroh.de> | 2020-12-30 22:44:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-31 21:51:00 +0100 |
commit | bbe787a0afd51307cdac2c023895c19df31519ca (patch) | |
tree | 44dc80cf50b22b461c27c1e9d99fa2c9ff00e22e /Libraries/LibC | |
parent | 2568a93b5dd29d2b06d613a4ece502ee696f189a (diff) | |
download | serenity-bbe787a0afd51307cdac2c023895c19df31519ca.zip |
Everywhere: Re-format with clang-format-11
Compared to version 10 this fixes a bunch of formatting issues, mostly
around structs/classes with attributes like [[gnu::packed]], and
incorrect insertion of spaces in parameter types ("T &"/"T &&").
I also removed a bunch of // clang-format off/on and FIXME comments that
are no longer relevant - on the other hand it tried to destroy a couple of
neatly formatted comments, so I had to add some as well.
Diffstat (limited to 'Libraries/LibC')
-rw-r--r-- | Libraries/LibC/dirent.cpp | 3 | ||||
-rw-r--r-- | Libraries/LibC/net/if.h | 3 | ||||
-rw-r--r-- | Libraries/LibC/regex.h | 2 | ||||
-rw-r--r-- | Libraries/LibC/sys/arch/i386/regs.h | 3 |
4 files changed, 7 insertions, 4 deletions
diff --git a/Libraries/LibC/dirent.cpp b/Libraries/LibC/dirent.cpp index 1d6a932371..8e9701177d 100644 --- a/Libraries/LibC/dirent.cpp +++ b/Libraries/LibC/dirent.cpp @@ -64,8 +64,7 @@ int closedir(DIR* dirp) return rc; } -struct [[gnu::packed]] sys_dirent -{ +struct [[gnu::packed]] sys_dirent { ino_t ino; u8 file_type; size_t namelen; diff --git a/Libraries/LibC/net/if.h b/Libraries/LibC/net/if.h index 9161e2def9..b82258a7b0 100644 --- a/Libraries/LibC/net/if.h +++ b/Libraries/LibC/net/if.h @@ -47,6 +47,8 @@ struct ifreq { void* ifru_data; unsigned int ifru_index; } ifr_ifru; + + // clang-format off #define ifr_addr ifr_ifru.ifru_addr // address #define ifr_dstaddr ifr_ifru.ifru_dstaddr // other end of p-to-p link #define ifr_broadaddr ifr_ifru.ifru_broadaddr // broadcast address @@ -63,6 +65,7 @@ struct ifreq { #define ifr_index ifr_ifru.ifru_index // interface index #define ifr_llprio ifr_ifru.ifru_metric // link layer priority #define ifr_hwaddr ifr_ifru.ifru_hwaddr // MAC address + // clang-format on }; __END_DECLS diff --git a/Libraries/LibC/regex.h b/Libraries/LibC/regex.h index 3fbcadecd7..b7e01ae981 100644 --- a/Libraries/LibC/regex.h +++ b/Libraries/LibC/regex.h @@ -101,6 +101,7 @@ enum __RegexAllFlags { __Regex_Last = __Regex_SkipTrimEmptyMatches }; +// clang-format off // Values for the cflags parameter to the regcomp() function: #define REG_EXTENDED __Regex_Extended // Use Extended Regular Expressions. #define REG_ICASE __Regex_Insensitive // Ignore case in match. @@ -114,6 +115,7 @@ enum __RegexAllFlags { //static_assert (sizeof(FlagsUnderlyingType) * 8 >= regex::POSIXFlags::Last << 1), "flags type too small") #define REG_SEARCH __Regex_Last << 1 +// clang-format on int regcomp(regex_t*, const char*, int); int regexec(const regex_t*, const char*, size_t, regmatch_t[], int); diff --git a/Libraries/LibC/sys/arch/i386/regs.h b/Libraries/LibC/sys/arch/i386/regs.h index f22d070949..d15d0fdd86 100644 --- a/Libraries/LibC/sys/arch/i386/regs.h +++ b/Libraries/LibC/sys/arch/i386/regs.h @@ -28,8 +28,7 @@ #include <AK/Types.h> -struct [[gnu::packed]] PtraceRegisters -{ +struct [[gnu::packed]] PtraceRegisters { u32 eax; u32 ecx; u32 edx; |