From ecd8046585663d4330d341744c306f266fcef90b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Sat, 15 Jun 2024 13:27:02 -0700 Subject: [PATCH] clang-format 19.0.0git --- libc/calls/struct/filter.internal.h | 5 +++-- libc/sock/epoll.c | 5 +++-- libc/thread/thread.h | 4 +++- test/libc/runtime/memtrack_test.c | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libc/calls/struct/filter.internal.h b/libc/calls/struct/filter.internal.h index eaaac9269..72624e942 100644 --- a/libc/calls/struct/filter.internal.h +++ b/libc/calls/struct/filter.internal.h @@ -23,9 +23,10 @@ struct sock_fprog { #define BPF_TAX 0x00 #define BPF_TXA 0x80 -#define BPF_STMT(code, k) {(unsigned short)(code), 0, 0, k} +#define BPF_STMT(code, k) \ + { (unsigned short)(code), 0, 0, k } #define BPF_JUMP(code, k, jumptrue, jumpfalse) \ - {(unsigned short)(code), jumptrue, jumpfalse, k} + { (unsigned short)(code), jumptrue, jumpfalse, k } #define BPF_MEMWORDS 16 diff --git a/libc/sock/epoll.c b/libc/sock/epoll.c index 4f652e09f..1be06e4d5 100644 --- a/libc/sock/epoll.c +++ b/libc/sock/epoll.c @@ -108,10 +108,11 @@ https://github.com/piscisaureus/wepoll"); (EPOLLIN | EPOLLPRI | EPOLLOUT | EPOLLERR | EPOLLHUP | EPOLLRDNORM | \ EPOLLRDBAND | EPOLLWRNORM | EPOLLWRBAND | EPOLLMSG | EPOLLRDHUP) -#define RTL_CONSTANT_STRING(s) {sizeof(s) - sizeof((s)[0]), sizeof(s), s} +#define RTL_CONSTANT_STRING(s) \ + { sizeof(s) - sizeof((s)[0]), sizeof(s), s } #define RTL_CONSTANT_OBJECT_ATTRIBUTES(ObjectName, Attributes) \ - {sizeof(struct NtObjectAttributes), 0, ObjectName, Attributes, NULL, NULL} + { sizeof(struct NtObjectAttributes), 0, ObjectName, Attributes, NULL, NULL } #define RETURN_MAP_ERROR(value) \ do { \ diff --git a/libc/thread/thread.h b/libc/thread/thread.h index 7d4290b5a..374cafce5 100644 --- a/libc/thread/thread.h +++ b/libc/thread/thread.h @@ -44,7 +44,9 @@ COSMOPOLITAN_C_START_ #define PTHREAD_COND_INITIALIZER _PTHREAD_INIT #define PTHREAD_RWLOCK_INITIALIZER _PTHREAD_INIT #define PTHREAD_MUTEX_INITIALIZER _PTHREAD_INIT -#define _PTHREAD_INIT {0} + +#define _PTHREAD_INIT \ + { 0 } typedef uintptr_t pthread_t; typedef int pthread_id_np_t; diff --git a/test/libc/runtime/memtrack_test.c b/test/libc/runtime/memtrack_test.c index ca38b5218..0ccdeeb31 100644 --- a/test/libc/runtime/memtrack_test.c +++ b/test/libc/runtime/memtrack_test.c @@ -30,7 +30,8 @@ #define OPEN_MAX 16 -#define I(x, y) {x, y, 0, (y - x) * FRAMESIZE + FRAMESIZE} +#define I(x, y) \ + { x, y, 0, (y - x) * FRAMESIZE + FRAMESIZE } void SetUpOnce(void) { ASSERT_SYS(0, 0, pledge("stdio rpath", 0));