linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: blowfish: Fixed a multi line macro issue
@ 2011-04-07  6:49 Aditya Shevade
  2011-04-08 12:45 ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Shevade @ 2011-04-07  6:49 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller; +Cc: linux-crypto, Aditya Shevade

Fixed a multi line macro with do-while loop.
Fixed some other minor tab related issues.

Signed-off-by: Aditya Shevade <aditya.shevade@gmail.com>
---
 crypto/blowfish.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/crypto/blowfish.c b/crypto/blowfish.c
index a67d52e..5d9bc2e 100644
--- a/crypto/blowfish.c
+++ b/crypto/blowfish.c
@@ -309,9 +309,13 @@ static const u32 bf_sbox[256 * 4] = {
 #define GET32_0(x) (((x) >> (24)) & (0xff))
 
 #define bf_F(x) (((S[GET32_0(x)] + S[256 + GET32_1(x)]) ^ \
-          S[512 + GET32_2(x)]) + S[768 + GET32_3(x)])
+	S[512 + GET32_2(x)]) + S[768 + GET32_3(x)])
 
-#define ROUND(a, b, n)  b ^= P[n]; a ^= bf_F (b)
+#define ROUND(a, b, n)  \
+	do { \
+		b ^= P[n]; \
+		a ^= bf_F(b) \
+	} while (0)
 
 /*
  * The blowfish encipher, processes 64-bit blocks.
@@ -460,9 +464,9 @@ static struct crypto_alg alg = {
 	.cra_u			=	{ .cipher = {
 	.cia_min_keysize	=	BF_MIN_KEY_SIZE,
 	.cia_max_keysize	=	BF_MAX_KEY_SIZE,
-	.cia_setkey   		= 	bf_setkey,
-	.cia_encrypt 		=	bf_encrypt,
-	.cia_decrypt  		=	bf_decrypt } }
+	.cia_setkey		=	bf_setkey,
+	.cia_encrypt		=	bf_encrypt,
+	.cia_decrypt		=	bf_decrypt } }
 };
 
 static int __init blowfish_mod_init(void)
-- 
1.7.4.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-08 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07  6:49 [PATCH] crypto: blowfish: Fixed a multi line macro issue Aditya Shevade
2011-04-08 12:45 ` Herbert Xu
2011-04-08 17:46   ` Aditya Shevade
2011-04-08 17:53     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).