diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2020-09-18 09:49:51 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-25 21:18:17 +0200 |
commit | ede5dbd7b3ec1c7240d6ca2693a5ada307338b4c (patch) | |
tree | ee3a79ccadd3eaacfe7da533c71cb401d8146695 /Libraries/LibC | |
parent | 64cc3f51d0a1d4ddc68fe9e3b5da2834eac48dae (diff) | |
download | serenity-ede5dbd7b3ec1c7240d6ca2693a5ada307338b4c.zip |
Meta+LibC through LibHTTP: Make clang-format-10 clean
Why break at LibHTTP? Because "Meta+Libraries" would be insanely large,
and breaking between LibHTTP and LibJS makes the commits roughly evenly large.
Diffstat (limited to 'Libraries/LibC')
-rw-r--r-- | Libraries/LibC/arpa/inet.h | 2 | ||||
-rw-r--r-- | Libraries/LibC/dlfcn.cpp | 5 | ||||
-rw-r--r-- | Libraries/LibC/iconv.h | 2 | ||||
-rw-r--r-- | Libraries/LibC/limits.h | 2 | ||||
-rw-r--r-- | Libraries/LibC/malloc.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibC/mallocdefs.h | 1 | ||||
-rw-r--r-- | Libraries/LibC/setjmp.h | 2 | ||||
-rw-r--r-- | Libraries/LibC/signal.h | 2 | ||||
-rw-r--r-- | Libraries/LibC/spawn.cpp | 7 | ||||
-rw-r--r-- | Libraries/LibC/stddef.h | 12 | ||||
-rw-r--r-- | Libraries/LibC/stdio.h | 2 |
11 files changed, 19 insertions, 20 deletions
diff --git a/Libraries/LibC/arpa/inet.h b/Libraries/LibC/arpa/inet.h index 634facf858..28ac7096f9 100644 --- a/Libraries/LibC/arpa/inet.h +++ b/Libraries/LibC/arpa/inet.h @@ -37,7 +37,7 @@ __BEGIN_DECLS const char* inet_ntop(int af, const void* src, char* dst, socklen_t); int inet_pton(int af, const char* src, void* dst); -static inline int inet_aton(const char *cp, struct in_addr *inp) +static inline int inet_aton(const char* cp, struct in_addr* inp) { return inet_pton(AF_INET, cp, inp); } diff --git a/Libraries/LibC/dlfcn.cpp b/Libraries/LibC/dlfcn.cpp index eaa3c5f7df..4fac569030 100644 --- a/Libraries/LibC/dlfcn.cpp +++ b/Libraries/LibC/dlfcn.cpp @@ -32,8 +32,8 @@ #include <stdlib.h> #include <sys/stat.h> -#include <AK/LexicalPath.h> #include <AK/HashMap.h> +#include <AK/LexicalPath.h> #include <AK/RefPtr.h> #include <AK/ScopeGuard.h> #include <AK/String.h> @@ -85,7 +85,8 @@ void* dlopen(const char* filename, int flags) ScopeGuard close_fd_guard([fd]() { close(fd); }); - struct stat file_stats{}; + struct stat file_stats { + }; int ret = fstat(fd, &file_stats); if (ret < 0) { diff --git a/Libraries/LibC/iconv.h b/Libraries/LibC/iconv.h index 0316549fea..afcede1e71 100644 --- a/Libraries/LibC/iconv.h +++ b/Libraries/LibC/iconv.h @@ -26,8 +26,8 @@ #pragma once -#include <sys/cdefs.h> #include <stddef.h> +#include <sys/cdefs.h> __BEGIN_DECLS diff --git a/Libraries/LibC/limits.h b/Libraries/LibC/limits.h index 251cbd043f..71980f14b0 100644 --- a/Libraries/LibC/limits.h +++ b/Libraries/LibC/limits.h @@ -29,7 +29,7 @@ #include <bits/stdint.h> #ifndef PAGE_SIZE -#define PAGE_SIZE 4096 +# define PAGE_SIZE 4096 #endif #define PATH_MAX 4096 diff --git a/Libraries/LibC/malloc.cpp b/Libraries/LibC/malloc.cpp index 4e92751e25..e46d7f0d17 100644 --- a/Libraries/LibC/malloc.cpp +++ b/Libraries/LibC/malloc.cpp @@ -43,7 +43,7 @@ //#define MALLOC_DEBUG #define RECYCLE_BIG_ALLOCATIONS -#define MAGIC_PAGE_HEADER 0x42657274 // 'Bert' +#define MAGIC_PAGE_HEADER 0x42657274 // 'Bert' #define MAGIC_BIGALLOC_HEADER 0x42697267 // 'Birg' #define PAGE_ROUND_UP(x) ((((size_t)(x)) + PAGE_SIZE - 1) & (~(PAGE_SIZE - 1))) diff --git a/Libraries/LibC/mallocdefs.h b/Libraries/LibC/mallocdefs.h index 5ebda57797..b445fa671e 100644 --- a/Libraries/LibC/mallocdefs.h +++ b/Libraries/LibC/mallocdefs.h @@ -28,4 +28,3 @@ #define MALLOC_SCRUB_BYTE 0xdc #define FREE_SCRUB_BYTE 0xed - diff --git a/Libraries/LibC/setjmp.h b/Libraries/LibC/setjmp.h index 5873b0bdb9..78f3120d14 100644 --- a/Libraries/LibC/setjmp.h +++ b/Libraries/LibC/setjmp.h @@ -26,9 +26,9 @@ #pragma once +#include <bits/stdint.h> #include <signal.h> #include <stdbool.h> -#include <bits/stdint.h> #include <sys/cdefs.h> #include <sys/types.h> diff --git a/Libraries/LibC/signal.h b/Libraries/LibC/signal.h index 14961a66db..02a617920b 100644 --- a/Libraries/LibC/signal.h +++ b/Libraries/LibC/signal.h @@ -64,7 +64,7 @@ struct sigaction { int kill(pid_t, int sig); int killpg(int pgrp, int sig); sighandler_t signal(int sig, sighandler_t); -int pthread_sigmask(int how, const sigset_t *set, sigset_t *ol_dset); +int pthread_sigmask(int how, const sigset_t* set, sigset_t* ol_dset); int sigaction(int sig, const struct sigaction* act, struct sigaction* old_act); int sigemptyset(sigset_t*); int sigfillset(sigset_t*); diff --git a/Libraries/LibC/spawn.cpp b/Libraries/LibC/spawn.cpp index c68967fe70..797c946c68 100644 --- a/Libraries/LibC/spawn.cpp +++ b/Libraries/LibC/spawn.cpp @@ -34,14 +34,14 @@ #include <spawn.h> +#include <AK/Function.h> +#include <AK/Vector.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> -#include <unistd.h> #include <sys/stat.h> #include <sys/types.h> -#include <AK/Function.h> -#include <AK/Vector.h> +#include <unistd.h> struct posix_spawn_file_actions_state { Vector<Function<int()>, 4> actions; @@ -286,5 +286,4 @@ int posix_spawnattr_setsigmask(posix_spawnattr_t* attr, const sigset_t* sigmask) attr->sigmask = *sigmask; return 0; } - } diff --git a/Libraries/LibC/stddef.h b/Libraries/LibC/stddef.h index 17c03e7f97..4f7b710329 100644 --- a/Libraries/LibC/stddef.h +++ b/Libraries/LibC/stddef.h @@ -28,13 +28,13 @@ #ifndef KERNEL -#include <sys/cdefs.h> +# include <sys/cdefs.h> -#ifdef __cplusplus -# define NULL nullptr -#else -# define NULL ((void*)0) -#endif +# ifdef __cplusplus +# define NULL nullptr +# else +# define NULL ((void*)0) +# endif typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef __SIZE_TYPE__ size_t; diff --git a/Libraries/LibC/stdio.h b/Libraries/LibC/stdio.h index 6cd9ffe84c..498c8f82b7 100644 --- a/Libraries/LibC/stdio.h +++ b/Libraries/LibC/stdio.h @@ -28,9 +28,9 @@ #define _STDIO_H // Make GMP believe we exist. +#include <bits/FILE.h> #include <limits.h> #include <stdarg.h> -#include <bits/FILE.h> #include <sys/cdefs.h> #include <sys/types.h> |