2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

apply the modified style

This commit is contained in:
Evan Hunt
2020-02-13 14:44:37 -08:00
parent 0255a97473
commit e851ed0bb5
669 changed files with 35995 additions and 42219 deletions

View File

@@ -37,13 +37,12 @@
#include "dnstest.h"
static dns_dispatchmgr_t *dispatchmgr = NULL;
static dns_dispatch_t * dispatch = NULL;
static dns_view_t * view = NULL;
static dns_dispatch_t *dispatch = NULL;
static dns_view_t *view = NULL;
static int
_setup(void **state)
{
isc_result_t result;
_setup(void **state) {
isc_result_t result;
isc_sockaddr_t local;
UNUSED(state);
@@ -66,8 +65,7 @@ _setup(void **state)
}
static int
_teardown(void **state)
{
_teardown(void **state) {
UNUSED(state);
dns_dispatch_detach(&dispatch);
@@ -79,8 +77,7 @@ _teardown(void **state)
}
static void
mkres(dns_resolver_t **resolverp)
{
mkres(dns_resolver_t **resolverp) {
isc_result_t result;
result = dns_resolver_create(view, taskmgr, 1, 1, socketmgr, timermgr,
@@ -89,16 +86,14 @@ mkres(dns_resolver_t **resolverp)
}
static void
destroy_resolver(dns_resolver_t **resolverp)
{
destroy_resolver(dns_resolver_t **resolverp) {
dns_resolver_shutdown(*resolverp);
dns_resolver_detach(resolverp);
}
/* dns_resolver_create */
static void
create_test(void **state)
{
create_test(void **state) {
dns_resolver_t *resolver = NULL;
UNUSED(state);
@@ -109,10 +104,9 @@ create_test(void **state)
/* dns_resolver_gettimeout */
static void
gettimeout_test(void **state)
{
gettimeout_test(void **state) {
dns_resolver_t *resolver = NULL;
unsigned int timeout;
unsigned int timeout;
UNUSED(state);
@@ -126,10 +120,9 @@ gettimeout_test(void **state)
/* dns_resolver_settimeout */
static void
settimeout_test(void **state)
{
settimeout_test(void **state) {
dns_resolver_t *resolver = NULL;
unsigned int default_timeout, timeout;
unsigned int default_timeout, timeout;
UNUSED(state);
@@ -145,10 +138,9 @@ settimeout_test(void **state)
/* dns_resolver_settimeout */
static void
settimeout_default_test(void **state)
{
settimeout_default_test(void **state) {
dns_resolver_t *resolver = NULL;
unsigned int default_timeout, timeout;
unsigned int default_timeout, timeout;
UNUSED(state);
@@ -169,10 +161,9 @@ settimeout_default_test(void **state)
/* dns_resolver_settimeout below minimum */
static void
settimeout_belowmin_test(void **state)
{
settimeout_belowmin_test(void **state) {
dns_resolver_t *resolver = NULL;
unsigned int default_timeout, timeout;
unsigned int default_timeout, timeout;
UNUSED(state);
@@ -189,10 +180,9 @@ settimeout_belowmin_test(void **state)
/* dns_resolver_settimeout over maximum */
static void
settimeout_overmax_test(void **state)
{
settimeout_overmax_test(void **state) {
dns_resolver_t *resolver = NULL;
unsigned int timeout;
unsigned int timeout;
UNUSED(state);
@@ -205,8 +195,7 @@ settimeout_overmax_test(void **state)
}
int
main(void)
{
main(void) {
const struct CMUnitTest tests[] = {
cmocka_unit_test_setup_teardown(create_test, _setup, _teardown),
cmocka_unit_test_setup_teardown(gettimeout_test, _setup,
@@ -229,8 +218,7 @@ main(void)
#include <stdio.h>
int
main(void)
{
main(void) {
printf("1..0 # Skipped: cmocka not available\n");
return (0);
}