]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Update sources to Clang 18 formatting
authorMichal Nowak <mnowak@isc.org>
Tue, 23 Apr 2024 14:33:07 +0000 (16:33 +0200)
committerMichal Nowak <mnowak@isc.org>
Tue, 23 Apr 2024 14:59:58 +0000 (16:59 +0200)
(cherry picked from commit f454fa6deab1b007c9412cbc6b3e3d779904d12c)

17 files changed:
bin/named/server.c
contrib/dlz/bin/dlzbdb/dlzbdb.c
contrib/dlz/drivers/dlz_ldap_driver.c
contrib/dlz/drivers/dlz_odbc_driver.c
contrib/dlz/example/win32/DLLMain.c
lib/bind9/win32/DLLMain.c
lib/dns/include/dns/librpz.h
lib/dns/include/dns/rpz.h
lib/dns/rrl.c
lib/dns/win32/DLLMain.c
lib/dns/zone.c
lib/irs/win32/DLLMain.c
lib/isc/include/isc/util.h
lib/isc/win32/DLLMain.c
lib/isccc/win32/DLLMain.c
lib/isccfg/win32/DLLMain.c
lib/ns/win32/DLLMain.c

index 098e21d0acab3d3b1915157b1a0d08d5e38e0e3b..5290fcc35d7c612be98385b4299f15fe473d04bf 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 122d49668a242aad56add927b69e3071f2a33625..e7fd6e747739c171008e625a76a2e0943e606392 100644 (file)
@@ -874,7 +874,7 @@ bulk_write(char type, DB *database, DBC *dbcursor, DBT *bdbkey, DBT *bdbdata) {
                                printf("d %.*s\n", (int)retdlen, retdata);
                        }
                } /* end of for (DB_MULTIPLE_INIT....) */
-       }         /* end of for (;;) */
+       } /* end of for (;;) */
 
        /* free the buffer we created earlier */
        free(bdbdata->data);
index 072d285e98cda46894aa542c00221fc5ca5ec8ee..021dc8625305e72d5cf1da29d20b57c735d43478 100644 (file)
@@ -726,7 +726,7 @@ ldap_get_results(const char *zone, const char *record, const char *client,
                        goto cleanup;
                        break;
                } /* close switch(ldap_result) */
-       }         /* end for (int i = 0 i < 3; i++) */
+       } /* end for (int i = 0 i < 3; i++) */
 
        if (result != ISC_R_SUCCESS) {
                goto cleanup;
index dae55100b74967a478a3832a8409486fef344906..31f3485a20157a7bb38d2aa6c8b92f4f96de1390 100644 (file)
@@ -813,7 +813,7 @@ odbc_process_rs(dns_sdlzlookup_t *lookup, dbinstance_t *dbi) {
                                                                ttl, data);
                                }
                        } /* closes bid if () */
-               }         /* closes switch(fields) */
+               } /* closes switch(fields) */
 
                /* clean up mem */
                if (ttl_s != NULL) {
index ca7693456bbcd37415b676a3b3331e524225d329..68a4bbec825f6dba2e1f7d3638cd9a73d6898a6f 100644 (file)
@@ -19,7 +19,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process
index 62c6e53f6da1e0e43f968f715a61e64375bfc804..29d2bbf91600e14d7bb4d2a3d1e4ccdb1e187ca2 100644 (file)
@@ -18,7 +18,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process
index 110b798ec7a766f21faa9eddae4b258cd84c801b..5169c9a16aab8de4fe850f8b94d71176613cae44 100644 (file)
@@ -157,7 +157,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 f0cc57838a7bab4b072f3c597db89bbb3e71c9f6..5ceb6a6607c488b599b6badafc0696accf3ccf70 100644 (file)
@@ -88,7 +88,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 a8c25259e2e945ea1da189d5c9a53ca8c79904ac..b3e6ab687fcc0e6bf7915b6e20bd09c75c170b72 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 62c6e53f6da1e0e43f968f715a61e64375bfc804..29d2bbf91600e14d7bb4d2a3d1e4ccdb1e187ca2 100644 (file)
@@ -18,7 +18,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process
index b457095907b196c5f2add7c411571954192a3812..e31916fcfc98b085562dbb23c9ed8cc03bd0ada5 100644 (file)
@@ -1008,7 +1008,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 62c6e53f6da1e0e43f968f715a61e64375bfc804..29d2bbf91600e14d7bb4d2a3d1e4ccdb1e187ca2 100644 (file)
@@ -18,7 +18,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process
index 33965597cc0e0440b4dd2f0f014a1e523ec80875..b77f1ca34cce3754592b3f149bcc3728298e3a91 100644 (file)
@@ -369,9 +369,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__ */
 
 #if HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
index abaaf4031a2dff67f0835133ac4ab45ff81314c8..6b309dfa2e396235d4a1154d3277588946e91c5b 100644 (file)
@@ -23,7 +23,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process initialization or a call to
index 62c6e53f6da1e0e43f968f715a61e64375bfc804..29d2bbf91600e14d7bb4d2a3d1e4ccdb1e187ca2 100644 (file)
@@ -18,7 +18,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process
index 5c38e895905f3c38ec6b5412e656d766d94f76f1..e2a5718b6f2c96d892c5e5124887a7c159034fdc 100644 (file)
@@ -18,7 +18,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process
index 62c6e53f6da1e0e43f968f715a61e64375bfc804..29d2bbf91600e14d7bb4d2a3d1e4ccdb1e187ca2 100644 (file)
@@ -18,7 +18,7 @@
  * Called when we enter the DLL
  */
 __declspec(dllexport) BOOL WINAPI
-       DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
        switch (fdwReason) {
        /*
         * The DLL is loading due to process