Unify coding style

@sjaeckel integrated clang-format with formal coding style. Run his
script and commit changes.

There are pros and cons of this commit.

Mixed coding style is a "broken window". A good single style simplifies
reading and writing code.

On the other hand, this is a big change which will lead to conflicts.
This commit is contained in:
Dmitry Podgorny
2020-01-03 22:02:22 +02:00
parent eef07cef36
commit 562a06425b
62 changed files with 3972 additions and 3746 deletions

View File

@@ -18,14 +18,15 @@
#include "test.h"
#define fail_unless(expr) do { \
int result = (expr); \
if (!result) { \
printf("%s:%d: Assertion failed: %s\n", \
__FILE__, __LINE__, #expr); \
exit(1); \
} \
} while (0)
#define fail_unless(expr) \
do { \
int result = (expr); \
if (!result) { \
printf("%s:%d: Assertion failed: %s\n", __FILE__, __LINE__, \
#expr); \
exit(1); \
} \
} while (0)
static void create_destroy(void)
{
@@ -67,9 +68,7 @@ static void callbacks(void)
int ret;
ctx = xmpp_ctx_new(NULL, NULL);
parser = parser_new(ctx,
cbtest_handle_start,
cbtest_handle_end,
parser = parser_new(ctx, cbtest_handle_start, cbtest_handle_end,
cbtest_handle_stanza, NULL);
ret = parser_feed(parser, "<stream>", 8);