aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-11-02 17:51:51 -0400
committerJack Lloyd <[email protected]>2017-11-02 17:51:51 -0400
commit9e2fb18a1a61285bf35780631bbae44dfd099aa2 (patch)
tree01224035d7f37c9af6344e88050fd03800822cd1
parented4a03da6e04bed8565bc69b1f0c9637b0b4bc3e (diff)
Avoid using semicolon at and of do { } while(0) macro block.
Clearly I have a tic for this.
-rw-r--r--src/lib/block/serpent/serpent_sbox.h32
-rw-r--r--src/lib/block/serpent/serpent_simd/serpent_simd.cpp6
2 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/block/serpent/serpent_sbox.h b/src/lib/block/serpent/serpent_sbox.h
index 2301893a5..ab8c7cb76 100644
--- a/src/lib/block/serpent/serpent_sbox.h
+++ b/src/lib/block/serpent/serpent_sbox.h
@@ -34,7 +34,7 @@
B3 = B0; \
B0 = B1; \
B1 = B4; \
- } while(0);
+ } while(0)
#define SBoxE2(B0, B1, B2, B3) \
do { \
@@ -60,7 +60,7 @@
B2 = B3; \
B3 = B1; \
B1 = B4; \
- } while(0);
+ } while(0)
#define SBoxE3(B0, B1, B2, B3) \
do { \
@@ -83,7 +83,7 @@
B2 = B1; \
B1 = B3; \
B3 = ~B4; \
- } while(0);
+ } while(0)
#define SBoxE4(B0, B1, B2, B3) \
do { \
@@ -109,7 +109,7 @@
B1 = B2; \
B2 = B3; \
B3 = B4; \
- } while(0);
+ } while(0)
#define SBoxE5(B0, B1, B2, B3) \
do { \
@@ -136,7 +136,7 @@
B2 = B0; \
B0 = B1; \
B1 = B4; \
- } while(0);
+ } while(0)
#define SBoxE6(B0, B1, B2, B3) \
do { \
@@ -163,7 +163,7 @@
B0 = B1; \
B1 = B3; \
B3 = B4; \
- } while(0);
+ } while(0)
#define SBoxE7(B0, B1, B2, B3) \
do { \
@@ -186,7 +186,7 @@
B2 &= B4; \
B3 ^= B2; \
B2 = B4; \
- } while(0);
+ } while(0)
#define SBoxE8(B0, B1, B2, B3) \
do { \
@@ -214,7 +214,7 @@
B1 = B3; \
B3 = B0; \
B0 = B4; \
- } while(0);
+ } while(0)
#define SBoxD1(B0, B1, B2, B3) \
do { \
@@ -239,7 +239,7 @@
B4 ^= B2; \
B2 = B1; \
B1 = B4; \
- } while(0);
+ } while(0)
#define SBoxD2(B0, B1, B2, B3) \
do { \
@@ -267,7 +267,7 @@
B4 = B2; \
B2 = B3; \
B3 = B4; \
- } while(0);
+ } while(0)
#define SBoxD3(B0, B1, B2, B3) \
do { \
@@ -292,7 +292,7 @@
B3 ^= B0; \
B0 = B1; \
B1 = B4; \
- } while(0);
+ } while(0)
#define SBoxD4(B0, B1, B2, B3) \
do { \
@@ -318,7 +318,7 @@
B0 = B2; \
B2 = B3; \
B3 = B4; \
- } while(0);
+ } while(0)
#define SBoxD5(B0, B1, B2, B3) \
do { \
@@ -344,7 +344,7 @@
B2 ^= B1; \
B1 = B3; \
B3 = B4; \
- } while(0);
+ } while(0)
#define SBoxD6(B0, B1, B2, B3) \
do { \
@@ -372,7 +372,7 @@
B4 = B3; \
B3 = B2; \
B2 = B4; \
- } while(0);
+ } while(0)
#define SBoxD7(B0, B1, B2, B3) \
do { \
@@ -396,7 +396,7 @@
B0 = B1; \
B1 = B2; \
B2 = B4; \
- } while(0);
+ } while(0)
#define SBoxD8(B0, B1, B2, B3) \
do { \
@@ -423,6 +423,6 @@
B1 = B0; \
B0 = B3; \
B3 = B4; \
- } while(0);
+ } while(0)
#endif
diff --git a/src/lib/block/serpent/serpent_simd/serpent_simd.cpp b/src/lib/block/serpent/serpent_simd/serpent_simd.cpp
index b184b0d4a..ad4871cf6 100644
--- a/src/lib/block/serpent/serpent_simd/serpent_simd.cpp
+++ b/src/lib/block/serpent/serpent_simd/serpent_simd.cpp
@@ -17,7 +17,7 @@ namespace Botan {
B1 ^= SIMD_32::splat(m_round_key[4*round+1]); \
B2 ^= SIMD_32::splat(m_round_key[4*round+2]); \
B3 ^= SIMD_32::splat(m_round_key[4*round+3]); \
- } while(0);
+ } while(0)
/*
* Serpent's linear transformations
@@ -34,7 +34,7 @@ namespace Botan {
B2 ^= B3 ^ (B1 << 7); \
B0 = B0.rotl<5>(); \
B2 = B2.rotl<22>(); \
- } while(0);
+ } while(0)
#define i_transform(B0, B1, B2, B3) \
do { \
@@ -48,7 +48,7 @@ namespace Botan {
B1 ^= B0 ^ B2; \
B2 = B2.rotr<3>(); \
B0 = B0.rotr<13>(); \
- } while(0);
+ } while(0)
/*
* SIMD Serpent Encryption of 4 blocks in parallel