diff options
Diffstat (limited to 'src/lib/util')
-rw-r--r-- | src/lib/util/sha1.cpp | 26 | ||||
-rw-r--r-- | src/lib/util/unicode.cpp | 2 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/util/sha1.cpp b/src/lib/util/sha1.cpp index f1f00a60310..fcda6ff9995 100644 --- a/src/lib/util/sha1.cpp +++ b/src/lib/util/sha1.cpp @@ -174,7 +174,7 @@ sha1_transform(uint32_t *state, uint32_t *data) D = state[3]; E = state[4]; - /* Heavy mangling, in 4 sub-rounds of 20 interations each. */ + /* Heavy mangling, in 4 sub-rounds of 20 iterations each. */ subRound( A, B, C, D, E, f1, K1, data[ 0] ); subRound( E, A, B, C, D, f1, K1, data[ 1] ); subRound( D, E, A, B, C, f1, K1, data[ 2] ); @@ -427,17 +427,17 @@ sha1_digest(const struct sha1_ctx *ctx, word = ctx->digest[i]; switch (leftover) - { - default: - /* this is just here to keep the compiler happy; it can never happen */ - case 3: - digest[--j] = (word >> 8) & 0xff; - /* Fall through */ - case 2: - digest[--j] = (word >> 16) & 0xff; - /* Fall through */ - case 1: - digest[--j] = (word >> 24) & 0xff; - } + { + default: + /* this is just here to keep the compiler happy; it can never happen */ + case 3: + digest[--j] = (word >> 8) & 0xff; + /* Fall through */ + case 2: + digest[--j] = (word >> 16) & 0xff; + /* Fall through */ + case 1: + digest[--j] = (word >> 24) & 0xff; + } } } diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp index 8e6478beee3..4a83b675087 100644 --- a/src/lib/util/unicode.cpp +++ b/src/lib/util/unicode.cpp @@ -195,7 +195,7 @@ int uchar_from_utf8(char32_t *uchar, const char *utf8char, size_t count) { char32_t const auxchar = (unsigned char)utf8char[i]; - // all auxillary chars must be between 0x80-0xbf + // all auxiliary chars must be between 0x80-0xbf if ((auxchar & 0xc0) != 0x80) return -1; |