corrected code style errors

- add missing brackets around one-line statements
- add paretheses around return values
This commit is contained in:
Evan Hunt
2024-10-17 13:22:48 -07:00
parent 8467449407
commit 5ea1f6390d
24 changed files with 129 additions and 113 deletions

View File

@@ -70,10 +70,10 @@ static bool
cmp_tolower1(void *va, void *vb, unsigned int size) {
for (uint8_t *a = va, *b = vb; size-- > 0; a++, b++) {
if (TOLOWER(*a) != TOLOWER(*b)) {
return false;
return (false);
}
}
return true;
return (true);
}
static bool oldskool_result;

View File

@@ -77,7 +77,7 @@ rand_zipf(uint32_t max, double skew) {
double ratio = sample <= 1 ? pow(sample, -s)
: pow(sample, -s) / pow(invB, -s);
if (ratio > (double)isc_random32() / UINT32_MAX) {
return sample - 1;
return (sample - 1);
}
}
}

View File

@@ -68,15 +68,15 @@ check_ndots(irs_resconf_t *resconf) {
static isc_result_t
check_options(irs_resconf_t *resconf) {
if (irs_resconf_getattempts(resconf) != 3) {
return ISC_R_BADNUMBER; /* default value only */
return (ISC_R_BADNUMBER); /* default value only */
}
if (irs_resconf_getndots(resconf) != 2) {
return ISC_R_BADNUMBER;
return (ISC_R_BADNUMBER);
}
if (irs_resconf_gettimeout(resconf) != 1) {
return ISC_R_BADNUMBER;
return (ISC_R_BADNUMBER);
}
return (ISC_R_SUCCESS);