corrected code style errors
- add missing brackets around one-line statements - add paretheses around return values
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user