diff options
author | deraadt <> | 2014-06-27 06:07:35 +0000 |
---|---|---|
committer | deraadt <> | 2014-06-27 06:07:35 +0000 |
commit | fd6338db9db0aa87673a9fb6d1abc0ebb4507099 (patch) | |
tree | a15b222a92fe994ec9b207cf12743f2f3cb61fa8 /src/lib/libcrypto/modes | |
parent | 83921e06b0fd7ce1393248d64f8cd3b5265d9790 (diff) | |
download | openbsd-fd6338db9db0aa87673a9fb6d1abc0ebb4507099.tar.gz openbsd-fd6338db9db0aa87673a9fb6d1abc0ebb4507099.tar.bz2 openbsd-fd6338db9db0aa87673a9fb6d1abc0ebb4507099.zip |
hand-KNF macro the do { } while loops
Diffstat (limited to 'src/lib/libcrypto/modes')
-rw-r--r-- | src/lib/libcrypto/modes/gcm128.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libcrypto/modes/gcm128.c b/src/lib/libcrypto/modes/gcm128.c index 45951878e5..def8cca496 100644 --- a/src/lib/libcrypto/modes/gcm128.c +++ b/src/lib/libcrypto/modes/gcm128.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gcm128.c,v 1.8 2014/06/12 15:49:30 deraadt Exp $ */ | 1 | /* $OpenBSD: gcm128.c,v 1.9 2014/06/27 06:07:35 deraadt Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -70,18 +70,18 @@ | |||
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #define PACK(s) ((size_t)(s)<<(sizeof(size_t)*8-16)) | 72 | #define PACK(s) ((size_t)(s)<<(sizeof(size_t)*8-16)) |
73 | #define REDUCE1BIT(V) do { \ | 73 | #define REDUCE1BIT(V) \ |
74 | if (sizeof(size_t)==8) { \ | 74 | do { \ |
75 | u64 T = U64(0xe100000000000000) & (0-(V.lo&1)); \ | 75 | if (sizeof(size_t)==8) { \ |
76 | V.lo = (V.hi<<63)|(V.lo>>1); \ | 76 | u64 T = U64(0xe100000000000000) & (0-(V.lo&1)); \ |
77 | V.hi = (V.hi>>1 )^T; \ | 77 | V.lo = (V.hi<<63)|(V.lo>>1); \ |
78 | } \ | 78 | V.hi = (V.hi>>1 )^T; \ |
79 | else { \ | 79 | } else { \ |
80 | u32 T = 0xe1000000U & (0-(u32)(V.lo&1)); \ | 80 | u32 T = 0xe1000000U & (0-(u32)(V.lo&1)); \ |
81 | V.lo = (V.hi<<63)|(V.lo>>1); \ | 81 | V.lo = (V.hi<<63)|(V.lo>>1); \ |
82 | V.hi = (V.hi>>1 )^((u64)T<<32); \ | 82 | V.hi = (V.hi>>1 )^((u64)T<<32); \ |
83 | } \ | 83 | } \ |
84 | } while(0) | 84 | } while(0) |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * Even though permitted values for TABLE_BITS are 8, 4 and 1, it should | 87 | * Even though permitted values for TABLE_BITS are 8, 4 and 1, it should |