From cce714c35f7eba9a81ddd30c095e3f7d9fbbaffd Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 16 Jun 2024 19:35:29 +0200 Subject: [PATCH] Fix indentation This indentation looks clearer to me. --- src/modules/module_utils.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/modules/module_utils.c b/src/modules/module_utils.c index c6518a13..04b85f6f 100644 --- a/src/modules/module_utils.c +++ b/src/modules/module_utils.c @@ -303,23 +303,22 @@ module_get_message_part(const char *message, char *part, unsigned int *pos, return i + 1; } } - if ((message[*pos] == '\n') - && (message[*pos + 1] == '\n')) { - part[i + 1] = 0; - (*pos)++; - return i + 1; - } - if ((len - 1 - i) > 4) { - if (((message[*pos] == '\r') - && (message[*pos + 1] == '\n')) - && ((message[*pos + 2] == '\r') - && (message[*pos + 3] == - '\n'))) { - part[i + 1] = 0; - (*pos)++; - return i + 1; - } - } + } + if ((message[*pos] == '\n') + && (message[*pos + 1] == '\n')) { + part[i + 1] = 0; + (*pos)++; + return i + 1; + } + } + if ((len - 1 - i) > 4) { + if ( (message[*pos] == '\r') + && (message[*pos + 1] == '\n') + && (message[*pos + 2] == '\r') + && (message[*pos + 3] == '\n')) { + part[i + 1] = 0; + (*pos)++; + return i + 1; } }