}
result = dns_dns64_findprefix(rdataset, prefix, &count);
- if (result == ISC_R_NOTFOUND)
+ if (result == ISC_R_NOTFOUND) {
return (ISC_R_SUCCESS);
- if (count > 10)
+ }
+ if (count > 10) {
count = 10;
+ }
for (i = 0; i < count; i++) {
result = isc_netaddr_totext(&prefix[i].addr, buf);
if (result != ISC_R_SUCCESS) {
check_result(result, "dns_message_sectiontotext");
} else if (dns64prefix) {
result = dns64prefix_answer(msg, buf);
- if (result == ISC_R_NOSPACE)
+ if (result == ISC_R_NOSPACE) {
goto buftoosmall;
+ }
check_result(result, "dns64prefix_answer");
} else {
result = short_answer(msg, flags, buf, query);
}
if (strcmp(name, "too-long") == 0) {
- for (i = 0; i < 511; i++)
+ for (i = 0; i < 511; i++) {
buf[i] = 'x';
+ }
buf[i] = '\0';
found = true;
result = state->putrr(lookup, "TXT", 0, buf);
* ones together. figure out how long to make
* string.
*/
- for (j = 2; j < fields; j++)
+ for (j = 2; j < fields; j++) {
len += strlen(safeGet(row[j])) + 1;
+ }
/*
* allocate string memory, allow for NULL to
* more than 4 fields, concatenate the last
* ones together.
*/
- for (j = 3; j < fields; j++)
+ for (j = 3; j < fields; j++) {
len += strlen(safeGet(row[j])) + 1;
+ }
tmpString = malloc(len + 1);
if (tmpString == NULL) {
/* Make the question into labels */
j = 12;
while (packet[j]) {
- for (i = j + 1; packet[i] != '\0' && packet[i] != '.'; i++)
+ for (i = j + 1; packet[i] != '\0' && packet[i] != '.'; i++) {
;
+ }
packet[j] = i - j - 1;
j = i;
}
* ones together. figure out how long to make
* string.
*/
- for (j = 2; j < fields; j++)
+ for (j = 2; j < fields; j++) {
len += strlen(safeGet(row[j])) + 1;
+ }
/*
* allocate string memory, allow for NULL to
* more than 4 fields, concatenate the last
* ones together.
*/
- for (j = 3; j < fields; j++)
+ for (j = 3; j < fields; j++) {
len += strlen(safeGet(row[j])) + 1;
+ }
tmpString = malloc(len + 1);
if (tmpString == NULL) {
char *newp;
char c, test;
- for (stringstart = string;;)
+ for (stringstart = string;;) {
switch (c = *pattern++) {
case EOS:
if ((flags & FNM_LEADING_DIR) && *string == '/') {
string++;
break;
}
+ }
/* NOTREACHED */
}
return (ISC_R_NOSPACE);
}
- if (EVP_PKEY_get_raw_public_key(pkey, r.base, &len) != 1)
+ if (EVP_PKEY_get_raw_public_key(pkey, r.base, &len) != 1) {
return (dst__openssl_toresult(ISC_R_FAILURE));
+ }
isc_buffer_add(data, len);
return (ISC_R_SUCCESS);
len = r.length;
ret = raw_key_to_ossl(key->key_alg, 0, r.base, &len, &pkey);
- if (ret != ISC_R_SUCCESS)
+ if (ret != ISC_R_SUCCESS) {
return ret;
+ }
isc_buffer_forward(data, len);
key->keydata.pkey = pkey;
}
buf = isc_mem_get(key->mctx, len);
if (EVP_PKEY_get_raw_private_key(key->keydata.pkey, buf,
- &len) != 1)
+ &len) != 1) {
DST_RET(dst__openssl_toresult(ISC_R_FAILURE));
+ }
priv.elements[i].tag = TAG_EDDSA_PRIVATEKEY;
priv.elements[i].length = len;
priv.elements[i].data = buf;
UNUSED(rdclass);
UNUSED(options);
- for (i = 0; i < 3; i++)
+ for (i = 0; i < 3; i++) {
RETERR(txt_fromwire(source, target));
+ }
return (ISC_R_SUCCESS);
}
myhip = *hip;
for (result = dns_rdata_hip_first(&myhip); result == ISC_R_SUCCESS;
result = dns_rdata_hip_next(&myhip))
- /* empty */;
+ {
+ /* initialize the names */
+ }
return (mem_tobuffer(target, hip->servers, hip->servers_len));
}
isc_mem_t *mctx = (isc_mem_t *)arg;
void *items[NUM_ITEMS];
size_t size = atomic_load(&mem_size);
- while (!atomic_compare_exchange_weak(&mem_size, &size, size / 2))
+ while (!atomic_compare_exchange_weak(&mem_size, &size, size / 2)) {
;
+ }
for (int i = 0; i < ITERS; i++) {
for (int j = 0; j < NUM_ITEMS; j++) {