diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-01-22 21:14:53 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-01-22 21:14:53 +0000 |
commit | ebfec1c531f32d424bb2aca6e7391ef3bfcbfe20 (patch) | |
tree | d017ab5fcc15f2eef851de089c3b2aef39d7a387 /src/blowfish.c | |
parent | 3d79f0a4309995956bd8889940cca22f7a15881d (diff) |
patch 9.0.1234: the code style has to be checked manuallyv9.0.1234
Problem: The code style has to be checked manually.
Solution: Add basic code style checks in a test. Fix or avoid uncovered
problems.
Diffstat (limited to 'src/blowfish.c')
-rw-r--r-- | src/blowfish.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/blowfish.c b/src/blowfish.c index dc977db428..88d4bce9e8 100644 --- a/src/blowfish.c +++ b/src/blowfish.c @@ -517,7 +517,8 @@ bf_self_test(void) // We can't simply use sizeof(UINT32_T), it would generate a compiler // warning. - if (ui != 0xffffffffUL || ui + 1 != 0) { + if (ui != 0xffffffffUL || ui + 1 != 0) + { err++; emsg(_(e_sizeof_uint32_isnot_four)); } @@ -573,13 +574,15 @@ bf_cfb_init( } } -#define BF_CFB_UPDATE(bfs, c) { \ +#define BF_CFB_UPDATE(bfs, c) \ +{ \ bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \ if (++bfs->update_offset == bfs->cfb_len) \ bfs->update_offset = 0; \ } -#define BF_RANBYTE(bfs, t) { \ +#define BF_RANBYTE(bfs, t) \ +{ \ if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \ bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \ t = bfs->cfb_buffer[bfs->randbyte_offset]; \ |