diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-04-29 13:53:42 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-04-29 14:13:06 +0200 |
commit | eef8de4df0247157e57f306062b1b86e01a41454 (patch) | |
tree | 949a172d60f0f58e04f99e18db038c435a909825 /src/nvim/sha256.c | |
parent | 0b3ae64480ea28bb57783c2269a61f0a60ffc55e (diff) | |
download | rneovim-eef8de4df0247157e57f306062b1b86e01a41454.tar.gz rneovim-eef8de4df0247157e57f306062b1b86e01a41454.tar.bz2 rneovim-eef8de4df0247157e57f306062b1b86e01a41454.zip |
refactor(uncrustify): change rules to better align with the style guide
Add space around arithmetic operators '+' and '-'.
Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
Remove space between '((' or '))' of control statements.
Add space between ')' and '{' of control statements.
Remove space between function name and '(' on function declaration.
Collapse empty blocks between '{' and '}'.
Remove newline at the end of the file.
Remove newline between 'enum' and '{'.
Remove newline between '}' and ')' in a function invocation.
Remove newline between '}' and 'while' of 'do' statement.
Diffstat (limited to 'src/nvim/sha256.c')
-rw-r--r-- | src/nvim/sha256.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/sha256.c b/src/nvim/sha256.c index 2c6199bf8b..53c9cb7c81 100644 --- a/src/nvim/sha256.c +++ b/src/nvim/sha256.c @@ -86,7 +86,7 @@ static void sha256_process(context_sha256_T *ctx, const char_u data[SHA256_BUFFE #define F1(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) #define R(t) \ - (W[t] = S1(W[(t) - 2]) + W[(t) - 7] + S0(W[(t) - 15]) + W[(t) - 16]) + (W[t] = S1(W[(t) - 2]) + W[(t) - 7] + S0(W[(t) - 15]) + W[(t) - 16]) #define P(a, b, c, d, e, f, g, h, x, K) { \ temp1 = (h) + S3(e) + F1(e, f, g) + (K) + (x); \ @@ -184,7 +184,7 @@ void sha256_update(context_sha256_T *ctx, const char_u *input, size_t length) return; } - uint32_t left = ctx->total[0] & (SHA256_BUFFER_SIZE-1); // left < buf size + uint32_t left = ctx->total[0] & (SHA256_BUFFER_SIZE - 1); // left < buf size ctx->total[0] += (uint32_t)length; ctx->total[0] &= 0xFFFFFFFF; @@ -335,7 +335,7 @@ bool sha256_self_test(void) sha256_finish(&ctx, sha256sum); for (size_t j = 0; j < SHA256_SUM_SIZE; j++) { - snprintf(output + j * SHA_STEP, SHA_STEP+1, "%02x", sha256sum[j]); + snprintf(output + j * SHA_STEP, SHA_STEP + 1, "%02x", sha256sum[j]); } } |