From 802e46f8ea36c344f112d7e1dd8d64d17a4cc939 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 15 Sep 2025 12:59:37 +0200 Subject: Run clang-format again --- lib/utils_tcp.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'lib/utils_tcp.c') diff --git a/lib/utils_tcp.c b/lib/utils_tcp.c index daae1d54..1482458b 100644 --- a/lib/utils_tcp.c +++ b/lib/utils_tcp.c @@ -29,18 +29,21 @@ #include "common.h" #include "utils_tcp.h" -#define VERBOSE(message) \ - do { \ - if (flags & NP_MATCH_VERBOSE) \ - puts(message); \ +#define VERBOSE(message) \ + do { \ + if (flags & NP_MATCH_VERBOSE) \ + puts(message); \ } while (0) -enum np_match_result np_expect_match(char *status, char **server_expect, int expect_count, int flags) { +enum np_match_result np_expect_match(char *status, char **server_expect, int expect_count, + int flags) { int i, match = 0, partial = 0; for (i = 0; i < expect_count; i++) { - if (flags & NP_MATCH_VERBOSE) - printf("looking for [%s] %s [%s]\n", server_expect[i], (flags & NP_MATCH_EXACT) ? "in beginning of" : "anywhere in", status); + if (flags & NP_MATCH_VERBOSE) { + printf("looking for [%s] %s [%s]\n", server_expect[i], + (flags & NP_MATCH_EXACT) ? "in beginning of" : "anywhere in", status); + } if (flags & NP_MATCH_EXACT) { if (strncmp(status, server_expect[i], strlen(server_expect[i])) == 0) { @@ -60,10 +63,12 @@ enum np_match_result np_expect_match(char *status, char **server_expect, int exp VERBOSE("couldn't find it"); } - if ((flags & NP_MATCH_ALL && match == expect_count) || (!(flags & NP_MATCH_ALL) && match >= 1)) + if ((flags & NP_MATCH_ALL && match == expect_count) || + (!(flags & NP_MATCH_ALL) && match >= 1)) { return NP_MATCH_SUCCESS; - else if (partial > 0 || !(flags & NP_MATCH_EXACT)) + } else if (partial > 0 || !(flags & NP_MATCH_EXACT)) { return NP_MATCH_RETRY; - else + } else { return NP_MATCH_FAILURE; + } } -- cgit v1.2.3-74-g34f1