Skip to content

Commit cfa2b54

Browse files
mativaitherbertx
authored andcommitted
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>
1 parent fae3664 commit cfa2b54

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎crypto/arc4.c‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Cryptographic API
33
*
44
* ARC4 Cipher Algorithm
@@ -33,16 +33,15 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
3333
ctx->x = 1;
3434
ctx->y = 0;
3535

36-
for(i = 0; i < 256; i++)
36+
for (i = 0; i < 256; i++)
3737
ctx->S[i] = i;
3838

39-
for(i = 0; i < 256; i++)
40-
{
39+
for (i = 0; i < 256; i++) {
4140
u8 a = ctx->S[i];
4241
j = (j + in_key[k] + a) & 0xff;
4342
ctx->S[i] = ctx->S[j];
4443
ctx->S[j] = a;
45-
if(++k >= key_len)
44+
if (++k >= key_len)
4645
k = 0;
4746
}
4847

@@ -80,9 +79,9 @@ static struct crypto_alg arc4_alg = {
8079
.cra_u = { .cipher = {
8180
.cia_min_keysize = ARC4_MIN_KEY_SIZE,
8281
.cia_max_keysize = ARC4_MAX_KEY_SIZE,
83-
.cia_setkey = arc4_set_key,
84-
.cia_encrypt = arc4_crypt,
85-
.cia_decrypt = arc4_crypt } }
82+
.cia_setkey = arc4_set_key,
83+
.cia_encrypt = arc4_crypt,
84+
.cia_decrypt = arc4_crypt } }
8685
};
8786

8887
static int __init arc4_init(void)

0 commit comments

Comments
 (0)