Merge branch '46-add-curly-braces' into 'master'
Add curly braces using uncrustify and then reformat with clang-format back Closes #46 See merge request isc-projects/bind9!3057 (cherry picked from commit67b68e06ad)36c6105eUse coccinelle to add braces to nested single line statementd14bb713Add copy of run-clang-tidy that can fixup the filepaths056e133cUse clang-tidy to add curly braces around one-line statements
This commit is contained in:
@@ -73,15 +73,17 @@ make_dispatchset(unsigned int ndisps)
|
||||
dns_dispatch_t *disp = NULL;
|
||||
|
||||
result = dns_dispatchmgr_create(dt_mctx, &dispatchmgr);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_sockaddr_any(&any);
|
||||
attrs = DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_UDP;
|
||||
result = dns_dispatch_getudp(dispatchmgr, socketmgr, taskmgr, &any, 512,
|
||||
6, 1024, 17, 19, attrs, attrs, &disp);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
|
||||
result = dns_dispatchset_create(dt_mctx, socketmgr, taskmgr, disp,
|
||||
&dset, ndisps);
|
||||
@@ -200,8 +202,9 @@ nameserver(isc_task_t *task, isc_event_t *event)
|
||||
isc_socket_attach(sock, &dummy);
|
||||
result = isc_socket_sendto(sock, ®ion, task, senddone, sock,
|
||||
&ev->address, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_socket_detach(&dummy);
|
||||
}
|
||||
|
||||
/*
|
||||
* send nextitem message.
|
||||
@@ -212,8 +215,9 @@ nameserver(isc_task_t *task, isc_event_t *event)
|
||||
isc_socket_attach(sock, &dummy);
|
||||
result = isc_socket_sendto(sock, ®ion, task, senddone, sock,
|
||||
&ev->address, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_socket_detach(&dummy);
|
||||
}
|
||||
isc_event_free(&event);
|
||||
}
|
||||
|
||||
@@ -364,4 +368,4 @@ main(void)
|
||||
return (0);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* if HAVE_CMOCKA */
|
||||
|
||||
Reference in New Issue
Block a user