2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 23:25:38 +00:00

Whitespace fixes

This commit is contained in:
Ondřej Surý
2018-08-23 10:19:43 +02:00
parent 65de91f512
commit 31b5360943
2 changed files with 19 additions and 19 deletions

View File

@@ -845,18 +845,18 @@ parse_xint(uint32_t *uip, const char *value, uint32_t max,
static void static void
newopts(struct query *query) { newopts(struct query *query) {
size_t len = sizeof(query->ednsopts[0]) * EDNSOPTS; size_t len = sizeof(query->ednsopts[0]) * EDNSOPTS;
size_t i; size_t i;
query->ednsopts = isc_mem_allocate(mctx, len); query->ednsopts = isc_mem_allocate(mctx, len);
if (query->ednsopts == NULL) if (query->ednsopts == NULL)
fatal("out of memory"); fatal("out of memory");
for (i = 0; i < EDNSOPTS; i++) { for (i = 0; i < EDNSOPTS; i++) {
query->ednsopts[i].code = 0; query->ednsopts[i].code = 0;
query->ednsopts[i].length = 0; query->ednsopts[i].length = 0;
query->ednsopts[i].value = NULL; query->ednsopts[i].value = NULL;
} }
} }
static void static void
@@ -1296,7 +1296,7 @@ plus_option(char *option, struct query *query, bool global)
"specified"); "specified");
} }
value = strtok_r(NULL, "\0", value = strtok_r(NULL, "\0",
&last); &last);
save_opt(query, code, value); save_opt(query, code, value);
break; break;
default: default:

View File

@@ -84,7 +84,7 @@ const void *
isc_hash_get_initializer(void) { isc_hash_get_initializer(void) {
if (ISC_UNLIKELY(!fnv_initialized)) if (ISC_UNLIKELY(!fnv_initialized))
RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) == RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
return (&fnv_offset_basis); return (&fnv_offset_basis);
} }
@@ -99,7 +99,7 @@ isc_hash_set_initializer(const void *initializer) {
*/ */
if (ISC_UNLIKELY(!fnv_initialized)) if (ISC_UNLIKELY(!fnv_initialized))
RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) == RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
fnv_offset_basis = *((const unsigned int *)initializer); fnv_offset_basis = *((const unsigned int *)initializer);
} }
@@ -108,7 +108,7 @@ isc_hash_set_initializer(const void *initializer) {
uint32_t uint32_t
isc_hash_function(const void *data, size_t length, bool case_sensitive, isc_hash_function(const void *data, size_t length, bool case_sensitive,
const uint32_t *previous_hashp) const uint32_t *previous_hashp)
{ {
uint32_t hval; uint32_t hval;
const unsigned char *bp; const unsigned char *bp;
@@ -118,11 +118,11 @@ isc_hash_function(const void *data, size_t length, bool case_sensitive,
if (ISC_UNLIKELY(!fnv_initialized)) { if (ISC_UNLIKELY(!fnv_initialized)) {
RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) == RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
} }
hval = ISC_UNLIKELY(previous_hashp != NULL) ? *previous_hashp hval = ISC_UNLIKELY(previous_hashp != NULL) ? *previous_hashp
: fnv_offset_basis; : fnv_offset_basis;
if (length == 0) { if (length == 0) {
return (hval); return (hval);
@@ -157,7 +157,7 @@ isc_hash_function(const void *data, size_t length, bool case_sensitive,
uint32_t uint32_t
isc_hash_function_reverse(const void *data, size_t length, bool case_sensitive, isc_hash_function_reverse(const void *data, size_t length, bool case_sensitive,
const uint32_t *previous_hashp) const uint32_t *previous_hashp)
{ {
uint32_t hval; uint32_t hval;
const unsigned char *bp; const unsigned char *bp;
@@ -167,11 +167,11 @@ isc_hash_function_reverse(const void *data, size_t length, bool case_sensitive,
if (ISC_UNLIKELY(!fnv_initialized)) { if (ISC_UNLIKELY(!fnv_initialized)) {
RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) == RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) ==
ISC_R_SUCCESS); ISC_R_SUCCESS);
} }
hval = ISC_UNLIKELY(previous_hashp != NULL) ? *previous_hashp hval = ISC_UNLIKELY(previous_hashp != NULL) ? *previous_hashp
: fnv_offset_basis; : fnv_offset_basis;
if (length == 0) { if (length == 0) {
return (hval); return (hval);