mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-03 08:05:21 +00:00
Use ControlStatementsExceptControlMacros for SpaceBeforeParens
> Put a space before opening parentheses only after control statement
> keywords (for/if/while...) except this option doesn’t apply to ForEach
> and If macros. This is useful in projects where ForEach/If macros are
> treated as function calls instead of control statements.
(cherry picked from commit 42496f3f4a
)
This commit is contained in:
@@ -82,3 +82,4 @@ ContinuationIndentWidth: 8
|
||||
ForEachMacros: [ 'cds_lfs_for_each', 'cds_lfs_for_each_safe', 'cds_list_for_each_entry_safe', 'ISC_LIST_FOREACH', 'ISC_LIST_FOREACH_SAFE', 'ISC_LIST_FOREACH_REV', 'ISC_LIST_FOREACH_REV_SAFE' ]
|
||||
RemoveParentheses: ReturnStatement
|
||||
RemoveSemicolon: true
|
||||
SpaceBeforeParens: ControlStatementsExceptControlMacros
|
||||
|
@@ -81,3 +81,4 @@ Standard: Cpp11
|
||||
ContinuationIndentWidth: 8
|
||||
RemoveParentheses: ReturnStatement
|
||||
RemoveSemicolon: true
|
||||
SpaceBeforeParens: ControlStatementsExceptControlMacros
|
||||
|
@@ -462,8 +462,7 @@ static void
|
||||
dns__acl_destroy_port_transports(dns_acl_t *acl) {
|
||||
dns_acl_port_transports_t *port_proto = NULL;
|
||||
dns_acl_port_transports_t *next = NULL;
|
||||
ISC_LIST_FOREACH_SAFE (acl->ports_and_transports, port_proto, link,
|
||||
next)
|
||||
ISC_LIST_FOREACH_SAFE(acl->ports_and_transports, port_proto, link, next)
|
||||
{
|
||||
ISC_LIST_DEQUEUE(acl->ports_and_transports, port_proto, link);
|
||||
isc_mem_put(acl->mctx, port_proto, sizeof(*port_proto));
|
||||
|
@@ -485,8 +485,7 @@ msgresetnames(dns_message_t *msg, unsigned int first_section) {
|
||||
for (size_t i = first_section; i < DNS_SECTION_MAX; i++) {
|
||||
dns_name_t *name = NULL, *next_name = NULL;
|
||||
|
||||
ISC_LIST_FOREACH_SAFE (msg->sections[i], name, link, next_name)
|
||||
{
|
||||
ISC_LIST_FOREACH_SAFE(msg->sections[i], name, link, next_name) {
|
||||
ISC_LIST_UNLINK(msg->sections[i], name, link);
|
||||
|
||||
msgresetname(msg, name);
|
||||
|
@@ -87,9 +87,10 @@ sched_affinity_ncpus(void) {
|
||||
int i, n = 0;
|
||||
|
||||
for (i = 0; i < CPU_SETSIZE; ++i) {
|
||||
if (CPU_ISSET(i, &cpus))
|
||||
if (CPU_ISSET(i, &cpus)) {
|
||||
++n;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
#endif
|
||||
}
|
||||
@@ -115,9 +116,10 @@ cpuset_affinity_ncpus(void) {
|
||||
if (result != -1) {
|
||||
int i, n = 0;
|
||||
for (i = 0; i < CPU_SETSIZE; ++i) {
|
||||
if (CPU_ISSET(i, &cpus))
|
||||
if (CPU_ISSET(i, &cpus)) {
|
||||
++n;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user