Merge branch 'each-style-tweak' into 'master'

adjust clang-format options to get closer to ISC style

See merge request isc-projects/bind9!3061

(cherry picked from commit d3b49b6675)

0255a974 revise .clang-format and add a C formatting script in util
e851ed0b apply the modified style
This commit is contained in:
Ondřej Surý
2020-02-14 05:35:17 +00:00
parent c646c20e79
commit cdef20bb66
672 changed files with 36044 additions and 42228 deletions

View File

@@ -22,14 +22,13 @@
#include <isc/siphash.h>
void
native_isc_siphash24(const uint8_t *, const uint8_t *, const size_t, uint8_t *);
void native_isc_siphash24(const uint8_t *, const uint8_t *, const size_t,
uint8_t *);
#if HAVE_OPENSSL_SIPHASH
void
openssl_isc_siphash24(const uint8_t *, const uint8_t *, const size_t,
uint8_t *);
void openssl_isc_siphash24(const uint8_t *, const uint8_t *, const size_t,
uint8_t *);
#undef HAVE_OPENSSL_SIPHASH
#define isc_siphash24 native_isc_siphash24
@@ -37,7 +36,7 @@ openssl_isc_siphash24(const uint8_t *, const uint8_t *, const size_t,
#undef isc_siphash24
#define HAVE_OPENSSL_SIPHASH 1
#define isc_siphash24 openssl_isc_siphash24
#define isc_siphash24 openssl_isc_siphash24
#include "../siphash.c"
#undef isc_siphash24
@@ -694,8 +693,7 @@ const uint8_t vectors[64][8] = {
#if HAVE_OPENSSL_SIPHASH
static void
openssl_isc_siphash24_test(void **state)
{
openssl_isc_siphash24_test(void **state) {
UNUSED(state);
uint8_t in[64], out[8], key[16];
@@ -712,8 +710,7 @@ openssl_isc_siphash24_test(void **state)
#endif /* if HAVE_OPENSSL_SIPHASH */
static void
native_isc_siphash24_test(void **state)
{
native_isc_siphash24_test(void **state) {
UNUSED(state);
uint8_t in[64], out[8], key[16];
@@ -729,8 +726,7 @@ native_isc_siphash24_test(void **state)
}
int
main(void)
{
main(void) {
const struct CMUnitTest tests[] = {
#if HAVE_OPENSSL_SIPHASH
cmocka_unit_test(openssl_isc_siphash24_test),
@@ -746,8 +742,7 @@ main(void)
#include <stdio.h>
int
main(void)
{
main(void) {
printf("1..0 # Skipped: cmocka not available\n");
return (0);
}