]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use clang-format-19 to update formatting
authorOndřej Surý <ondrej@isc.org>
Thu, 15 Aug 2024 07:36:53 +0000 (09:36 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 22 Aug 2024 07:21:55 +0000 (09:21 +0200)
This is purely result of running:

    git-clang-format-19 --binary clang-format-19 origin/main

bin/named/server.c
lib/dns/rdata/generic/opt_41.c
lib/dns/rdataslab.c
lib/isc/include/isc/thread.h
lib/isc/netmgr/netmgr-int.h
tests/bench/load-names.c

index eacd3ac88cd2cb68d864b33e246a2f245ea99136..57d1f9abf66bd5853f2d8a4a7f658827c7d0a6a9 100644 (file)
 #endif /* HAVE_LMDB */
 
 #ifndef SIZE_MAX
-#define SIZE_MAX ((size_t) - 1)
+#define SIZE_MAX ((size_t)-1)
 #endif /* ifndef SIZE_MAX */
 
 #ifndef SIZE_AS_PERCENT
-#define SIZE_AS_PERCENT ((size_t) - 2)
+#define SIZE_AS_PERCENT ((size_t)-2)
 #endif /* ifndef SIZE_AS_PERCENT */
 
 /* RFC7828 defines timeout as 16-bit value specified in units of 100
index 12695d1a5011e1ece623f85f77a2eaecbda93b60..433df37299b20edfa9a91f763a7d0621c507354c 100644 (file)
@@ -72,9 +72,9 @@ totext_opt(ARGS_TOTEXT) {
                        or = r;
                        or.length = length;
                        if (tctx->width == 0) { /* No splitting */
-                               RETERR(isc_base64_totext(& or, 60, "", target));
+                               RETERR(isc_base64_totext(&or, 60, "", target));
                        } else {
-                               RETERR(isc_base64_totext(& or, tctx->width - 2,
+                               RETERR(isc_base64_totext(&or, tctx->width - 2,
                                                         tctx->linebreak,
                                                         target));
                        }
index 67f51018063cd1fe9af45b844f1db71a2791218c..1c8bb816d8f710ca2bce53cf860112db4c6de6d6 100644 (file)
@@ -89,8 +89,7 @@ struct xrdata {
 #endif /* if DNS_RDATASET_FIXED */
 };
 
-#define peek_uint16(buffer) \
-       ({ ((uint16_t) * (buffer) << 8) | *((buffer) + 1); })
+#define peek_uint16(buffer) ({ ((uint16_t)*(buffer) << 8) | *((buffer) + 1); })
 #define get_uint16(buffer)                            \
        ({                                            \
                uint16_t __ret = peek_uint16(buffer); \
index a24dfcdca5f59e612cc8bcdc53667013ae9f3145..8920ca2f191473aa8fbefa142435594607b9e605 100644 (file)
@@ -54,6 +54,6 @@ isc_thread_yield(void);
 void
 isc_thread_setname(isc_thread_t thread, const char *name);
 
-#define isc_thread_self (uintptr_t) pthread_self
+#define isc_thread_self (uintptr_t)pthread_self
 
 ISC_LANG_ENDDECLS
index 51da0a309ed9b93d719c8195601b8729b1678255..03f7ba3a086d03688600c6fdc4d200421e776109 100644 (file)
@@ -134,7 +134,7 @@ STATIC_ASSERT(ISC_NETMGR_TCP_RECVBUF_SIZE <= ISC_NETMGR_RECVBUF_SIZE,
 
 #if defined(__linux__)
 #include <syscall.h>
-#define gettid() (uint64_t) syscall(SYS_gettid)
+#define gettid() (uint64_t)syscall(SYS_gettid)
 #elif defined(__FreeBSD__)
 #include <pthread_np.h>
 #define gettid() (uint64_t)(pthread_getthreadid_np())
index 70d7d074436629f3c3a2852d20efa882f43a4fe6..4a11375a98b4061e27f21ae099d53bb704b6ba4b 100644 (file)
@@ -566,7 +566,7 @@ main(int argc, char *argv[]) {
                        void *map = NULL;
 
                        isc_mem_create(&mem);
-                       map = fun->new (mem);
+                       map = fun->new(mem);
 
                        size_t nitems = lines / (nthreads + 1);