summaryrefslogtreecommitdiff
path: root/crypto/arc4.c
diff options
context:
space:
mode:
authorMati Vait <mativait@gmail.com>2011-06-08 17:26:00 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2011-06-30 03:44:05 +0400
commitcfa2b54eca28103d07e5334aa06b78321fbe1d9a (patch)
tree2c992efc775674cf47c8d89b736a54d8e30b4627 /crypto/arc4.c
parentfae366401bfcfe18b9260b9057f506c38c171b7c (diff)
downloadlinux-cfa2b54eca28103d07e5334aa06b78321fbe1d9a.tar.xz
crypto: arc4 - Fixed coding style issues
Fixed coding style issues: unnecessary spaces, parentheses on wrong lines. Signed-off-by: Mati Vait <mativait@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/arc4.c')
-rw-r--r--crypto/arc4.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/crypto/arc4.c b/crypto/arc4.c
index 8be47e13a9e3..0d12a96da1d8 100644
--- a/crypto/arc4.c
+++ b/crypto/arc4.c
@@ -1,4 +1,4 @@
-/*
+/*
* Cryptographic API
*
* ARC4 Cipher Algorithm
@@ -33,16 +33,15 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
ctx->x = 1;
ctx->y = 0;
- for(i = 0; i < 256; i++)
+ for (i = 0; i < 256; i++)
ctx->S[i] = i;
- for(i = 0; i < 256; i++)
- {
+ for (i = 0; i < 256; i++) {
u8 a = ctx->S[i];
j = (j + in_key[k] + a) & 0xff;
ctx->S[i] = ctx->S[j];
ctx->S[j] = a;
- if(++k >= key_len)
+ if (++k >= key_len)
k = 0;
}
@@ -80,9 +79,9 @@ static struct crypto_alg arc4_alg = {
.cra_u = { .cipher = {
.cia_min_keysize = ARC4_MIN_KEY_SIZE,
.cia_max_keysize = ARC4_MAX_KEY_SIZE,
- .cia_setkey = arc4_set_key,
- .cia_encrypt = arc4_crypt,
- .cia_decrypt = arc4_crypt } }
+ .cia_setkey = arc4_set_key,
+ .cia_encrypt = arc4_crypt,
+ .cia_decrypt = arc4_crypt } }
};
static int __init arc4_init(void)