linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aditya Shevade <aditya.shevade@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org, Aditya Shevade <aditya.shevade@gmail.com>
Subject: [PATCH] crypto: blowfish: Fixed a multi line macro issue
Date: Wed,  6 Apr 2011 23:49:20 -0700	[thread overview]
Message-ID: <1302158960-20479-1-git-send-email-aditya.shevade@gmail.com> (raw)

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

             reply	other threads:[~2011-04-07  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07  6:49 Aditya Shevade [this message]
2011-04-08 12:45 ` [PATCH] crypto: blowfish: Fixed a multi line macro issue Herbert Xu
2011-04-08 17:46   ` Aditya Shevade
2011-04-08 17:53     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1302158960-20479-1-git-send-email-aditya.shevade@gmail.com \
    --to=aditya.shevade@gmail.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).