From 7d36275b2ac59a81e7cbe74e8af944dee19c572d Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 10 Jun 2022 19:48:45 +0200 Subject: [PATCH] made 'else' prettier --- src/lib/encrypter.c | 6 ++++-- src/lib/misc.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lib/encrypter.c b/src/lib/encrypter.c index 446b510..b7967e2 100644 --- a/src/lib/encrypter.c +++ b/src/lib/encrypter.c @@ -65,7 +65,8 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags) if (numberBuffer > 26) { numberBuffer += 70; - } else + } + else { numberBuffer += 64; } @@ -104,7 +105,8 @@ outputFlags encryptText(char *text, char *keyNew, inputFlags flags) if (i != 0) { textBuffer = realloc(textBuffer, numberBuffer); - } else + } + else { textBuffer = malloc(numberBuffer); } diff --git a/src/lib/misc.c b/src/lib/misc.c index 16d306c..4d7bdb8 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -157,10 +157,12 @@ void generateTextKeyChain(char *key, int *textKeyChain, int textKeyChainSize) if ((numberBuffer + 1) % 3 == 0) { textKeyChain[i] = key[numberBuffer] * key[numberBuffer2]; - } else if ((numberBuffer + 1) % 2 == 0) + } + else if ((numberBuffer + 1) % 2 == 0) { textKeyChain[i] = key[numberBuffer] - key[numberBuffer2]; - } else + } + else { textKeyChain[i] = key[numberBuffer] + key[numberBuffer2]; }