Merge branch '46-just-use-clang-format-to-reformat-sources' into 'master'

Reformat source code with clang-format

Closes #46

See merge request isc-projects/bind9!2156

(cherry picked from commit 7099e79a9b)

4c3b063e Import Linux kernel .clang-format with small modifications
f50b1e06 Use clang-format to reformat the source files
11341c76 Update the definition files for Windows
df6c1f76 Remove tkey_test (which is no-op anyway)
This commit is contained in:
Ondřej Surý
2020-02-12 14:33:32 +00:00
parent dbe15330fe
commit c931d8e417
974 changed files with 75952 additions and 74434 deletions

View File

@@ -11,11 +11,10 @@
#if HAVE_CMOCKA
#include <sched.h> /* IWYU pragma: keep */
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <sched.h> /* IWYU pragma: keep */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -33,7 +32,8 @@
#include "dnstest.h"
static int
_setup(void **state) {
_setup(void **state)
{
isc_result_t result;
UNUSED(state);
@@ -45,7 +45,8 @@ _setup(void **state) {
}
static int
_teardown(void **state) {
_teardown(void **state)
{
UNUSED(state);
dns_test_end();
@@ -53,21 +54,22 @@ _teardown(void **state) {
return (0);
}
#define BUFLEN 255
#define BIGBUFLEN (70 * 1024)
#define TEST_ORIGIN "test"
#define BUFLEN 255
#define BIGBUFLEN (70 * 1024)
#define TEST_ORIGIN "test"
/* test that dns_acl_isinsecure works */
static void
dns_acl_isinsecure_test(void **state) {
dns_acl_isinsecure_test(void **state)
{
isc_result_t result;
dns_acl_t *any = NULL;
dns_acl_t *none = NULL;
dns_acl_t *notnone = NULL;
dns_acl_t *notany = NULL;
dns_acl_t * any = NULL;
dns_acl_t * none = NULL;
dns_acl_t * notnone = NULL;
dns_acl_t * notany = NULL;
#if defined(HAVE_GEOIP2)
dns_acl_t *geoip = NULL;
dns_acl_t *notgeoip = NULL;
dns_acl_t * geoip = NULL;
dns_acl_t * notgeoip = NULL;
dns_aclelement_t *de;
#endif /* HAVE_GEOIP2 */
@@ -114,15 +116,15 @@ dns_acl_isinsecure_test(void **state) {
assert_int_equal(result, ISC_R_SUCCESS);
#endif /* HAVE_GEOIP2 */
assert_true(dns_acl_isinsecure(any)); /* any; */
assert_false(dns_acl_isinsecure(none)); /* none; */
assert_false(dns_acl_isinsecure(notany)); /* !any; */
assert_false(dns_acl_isinsecure(notnone)); /* !none; */
assert_true(dns_acl_isinsecure(any)); /* any; */
assert_false(dns_acl_isinsecure(none)); /* none; */
assert_false(dns_acl_isinsecure(notany)); /* !any; */
assert_false(dns_acl_isinsecure(notnone)); /* !none; */
#if defined(HAVE_GEOIP2)
assert_true(dns_acl_isinsecure(geoip)); /* geoip; */
assert_false(dns_acl_isinsecure(notgeoip)); /* !geoip; */
#endif /* HAVE_GEOIP2 */
assert_true(dns_acl_isinsecure(geoip)); /* geoip; */
assert_false(dns_acl_isinsecure(notgeoip)); /* !geoip; */
#endif /* HAVE_GEOIP2 */
dns_acl_detach(&any);
dns_acl_detach(&none);
@@ -135,10 +137,11 @@ dns_acl_isinsecure_test(void **state) {
}
int
main(void) {
main(void)
{
const struct CMUnitTest tests[] = {
cmocka_unit_test_setup_teardown(dns_acl_isinsecure_test,
_setup, _teardown),
cmocka_unit_test_setup_teardown(dns_acl_isinsecure_test, _setup,
_teardown),
};
return (cmocka_run_group_tests(tests, NULL, NULL));
@@ -149,7 +152,8 @@ main(void) {
#include <stdio.h>
int
main(void) {
main(void)
{
printf("1..0 # Skipped: cmocka not available\n");
return (0);
}