]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Update sources to Clang 18 formatting
authorMichal Nowak <mnowak@isc.org>
Wed, 6 Mar 2024 08:56:51 +0000 (09:56 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 23 Apr 2024 12:48:56 +0000 (12:48 +0000)
(cherry picked from commit f454fa6deab1b007c9412cbc6b3e3d779904d12c)

bin/named/server.c
lib/dns/include/dns/librpz.h
lib/dns/include/dns/rpz.h
lib/dns/rrl.c
lib/dns/zone.c
lib/isc/include/isc/util.h
lib/isc/picohttpparser.c

index 42a09151103917f6d9d2b92e8217d4a8b322625d..aed10583647a2035107dee2a01ea90c36dfdef35 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 */
 
 #ifdef TUNE_LARGE
index 8fdbe16db14b8ecd8dcc2b2de6319f22f81015d8..f825713096d746542fa561ea504506c4825da80b 100644 (file)
@@ -156,7 +156,7 @@ typedef struct {
 typedef uint32_t librpz_idx_t;
 #define LIBRPZ_IDX_NULL 0
 #define LIBRPZ_IDX_MIN 1
-#define LIBRPZ_IDX_BAD ((librpz_idx_t)-1)
+#define LIBRPZ_IDX_BAD ((librpz_idx_t) - 1)
 /**
  * Partial decoded results of a set of RPZ queries for a single DNS response
  * or iteration through the mapped file.
index 5885681dc8de3ae253ae12b2bf45ab335d6b585f..9e82f9cf1860458030355b4819d41e72199c9296 100644 (file)
@@ -89,7 +89,7 @@ typedef uint8_t dns_rpz_num_t;
  */
 typedef uint64_t dns_rpz_zbits_t;
 
-#define DNS_RPZ_ALL_ZBITS ((dns_rpz_zbits_t)-1)
+#define DNS_RPZ_ALL_ZBITS ((dns_rpz_zbits_t) - 1)
 
 #define DNS_RPZ_INVALID_NUM DNS_RPZ_MAX_ZONES
 
index 3be91b6253dca756b4d810a7f7e5b93f0d352e53..0c20df78ee88c445e7ccc6d64aa37b75eeeacfac 100644 (file)
@@ -53,30 +53,8 @@ log_end(dns_rrl_t *rrl, dns_rrl_entry_t *e, bool early, char *log_buf,
 static int
 hash_divisor(unsigned int initial) {
        static uint16_t primes[] = {
-               3,
-               5,
-               7,
-               11,
-               13,
-               17,
-               19,
-               23,
-               29,
-               31,
-               37,
-               41,
-               43,
-               47,
-               53,
-               59,
-               61,
-               67,
-               71,
-               73,
-               79,
-               83,
-               89,
-               97,
+               3,  5,  7,  11, 13, 17, 19, 23, 29, 31, 37, 41,
+               43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,
 #if 0
                101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157,
                163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227,
index 2bf1a50bb8505ab98ac318d2278f0014a03bbdeb..bdf2b8346c07362cc218b3d0cf58d0ce84c3508f 100644 (file)
@@ -1022,7 +1022,7 @@ static const char *dbargv_default[] = { "rbt" };
        do {                                                                 \
                isc_interval_t _i;                                           \
                uint32_t _j;                                                 \
-               _j = (b)-isc_random_uniform((b) / 4);                        \
+               _j = (b) - isc_random_uniform((b) / 4);                      \
                isc_interval_set(&_i, _j, 0);                                \
                if (isc_time_add((a), &_i, (c)) != ISC_R_SUCCESS) {          \
                        dns_zone_log(zone, ISC_LOG_WARNING,                  \
index 922661beaa3f6701b3522ab77063b6a9fea6a4fc..af197d24cff6f848992bb49fb67305a97a7b3725 100644 (file)
@@ -356,9 +356,9 @@ mock_assert(const int result, const char *const expression,
  * Alignment
  */
 #ifdef __GNUC__
-#define ISC_ALIGN(x, a) (((x) + (a)-1) & ~((typeof(x))(a)-1))
+#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a) - 1))
 #else /* ifdef __GNUC__ */
-#define ISC_ALIGN(x, a) (((x) + (a)-1) & ~((uintmax_t)(a)-1))
+#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((uintmax_t)(a) - 1))
 #endif /* ifdef __GNUC__ */
 
 /*%
index d82fd0198640a24792abb0cde2da6f3f18a37d27..59f5ff1a180e32ae342d5ecce63a3d6ebf4c7926 100644 (file)
@@ -52,7 +52,7 @@
 #define ALIGNED(n) __attribute__((aligned(n)))
 #endif
 
-#define IS_PRINTABLE_ASCII(c) ((unsigned char)(c)-040u < 0137u)
+#define IS_PRINTABLE_ASCII(c) ((unsigned char)(c) - 040u < 0137u)
 
 #define CHECK_EOF()           \
        if (buf == buf_end) { \