mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Use clang-tidy to add curly braces around one-line statements
The command used to reformat the files in this commit was: ./util/run-clang-tidy \ -clang-tidy-binary clang-tidy-11 -clang-apply-replacements-binary clang-apply-replacements-11 \ -checks=-*,readability-braces-around-statements \ -j 9 \ -fix \ -format \ -style=file \ -quiet clang-format -i --style=format $(git ls-files '*.c' '*.h') uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h') clang-format -i --style=format $(git ls-files '*.c' '*.h')
This commit is contained in:
@@ -36,11 +36,13 @@ dst_region_computeid(const isc_region_t *source)
|
||||
p = source->base;
|
||||
size = source->length;
|
||||
|
||||
for (ac = 0; size > 1; size -= 2, p += 2)
|
||||
for (ac = 0; size > 1; size -= 2, p += 2) {
|
||||
ac += ((*p) << 8) + *(p + 1);
|
||||
}
|
||||
|
||||
if (size > 0)
|
||||
if (size > 0) {
|
||||
ac += ((*p) << 8);
|
||||
}
|
||||
ac += (ac >> 16) & 0xffff;
|
||||
|
||||
return ((uint16_t)(ac & 0xffff));
|
||||
@@ -61,11 +63,13 @@ dst_region_computerid(const isc_region_t *source)
|
||||
|
||||
ac = ((*p) << 8) + *(p + 1);
|
||||
ac |= DNS_KEYFLAG_REVOKE;
|
||||
for (size -= 2, p += 2; size > 1; size -= 2, p += 2)
|
||||
for (size -= 2, p += 2; size > 1; size -= 2, p += 2) {
|
||||
ac += ((*p) << 8) + *(p + 1);
|
||||
}
|
||||
|
||||
if (size > 0)
|
||||
if (size > 0) {
|
||||
ac += ((*p) << 8);
|
||||
}
|
||||
ac += (ac >> 16) & 0xffff;
|
||||
|
||||
return ((uint16_t)(ac & 0xffff));
|
||||
@@ -132,13 +136,16 @@ dst_key_iszonekey(const dst_key_t *key)
|
||||
{
|
||||
REQUIRE(VALID_KEY(key));
|
||||
|
||||
if ((key->key_flags & DNS_KEYTYPE_NOAUTH) != 0)
|
||||
if ((key->key_flags & DNS_KEYTYPE_NOAUTH) != 0) {
|
||||
return (false);
|
||||
if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
|
||||
}
|
||||
if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE) {
|
||||
return (false);
|
||||
}
|
||||
if (key->key_proto != DNS_KEYPROTO_DNSSEC &&
|
||||
key->key_proto != DNS_KEYPROTO_ANY)
|
||||
key->key_proto != DNS_KEYPROTO_ANY) {
|
||||
return (false);
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
@@ -147,13 +154,16 @@ dst_key_isnullkey(const dst_key_t *key)
|
||||
{
|
||||
REQUIRE(VALID_KEY(key));
|
||||
|
||||
if ((key->key_flags & DNS_KEYFLAG_TYPEMASK) != DNS_KEYTYPE_NOKEY)
|
||||
if ((key->key_flags & DNS_KEYFLAG_TYPEMASK) != DNS_KEYTYPE_NOKEY) {
|
||||
return (false);
|
||||
if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE)
|
||||
}
|
||||
if ((key->key_flags & DNS_KEYFLAG_OWNERMASK) != DNS_KEYOWNER_ZONE) {
|
||||
return (false);
|
||||
}
|
||||
if (key->key_proto != DNS_KEYPROTO_DNSSEC &&
|
||||
key->key_proto != DNS_KEYPROTO_ANY)
|
||||
key->key_proto != DNS_KEYPROTO_ANY) {
|
||||
return (false);
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user