crypto: testmgr - white space removal on __test_hash
This patch inverts one if condition to remove code block indentation. Several white space clean-ups follow. Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
05b1d3386f
commit
5f2b424e5c
1 changed files with 62 additions and 65 deletions
|
@ -311,7 +311,9 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
|
|||
if (align_offset != 0)
|
||||
break;
|
||||
|
||||
if (template[i].np) {
|
||||
if (!template[i].np)
|
||||
continue;
|
||||
|
||||
j++;
|
||||
memset(result, 0, MAX_DIGEST_SIZE);
|
||||
|
||||
|
@ -334,27 +336,23 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
|
|||
if (template[i].ksize) {
|
||||
if (template[i].ksize > MAX_KEYLEN) {
|
||||
pr_err("alg: hash: setkey failed on test %d for %s: key size %d > %d\n",
|
||||
j, algo, template[i].ksize,
|
||||
MAX_KEYLEN);
|
||||
j, algo, template[i].ksize, MAX_KEYLEN);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
crypto_ahash_clear_flags(tfm, ~0);
|
||||
memcpy(key, template[i].key, template[i].ksize);
|
||||
ret = crypto_ahash_setkey(tfm, key,
|
||||
template[i].ksize);
|
||||
ret = crypto_ahash_setkey(tfm, key, template[i].ksize);
|
||||
|
||||
if (ret) {
|
||||
printk(KERN_ERR "alg: hash: setkey "
|
||||
"failed on chunking test %d "
|
||||
"for %s: ret=%d\n", j, algo,
|
||||
-ret);
|
||||
"for %s: ret=%d\n", j, algo, -ret);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
ahash_request_set_crypt(req, sg, result,
|
||||
template[i].psize);
|
||||
ahash_request_set_crypt(req, sg, result, template[i].psize);
|
||||
ret = crypto_ahash_digest(req);
|
||||
switch (ret) {
|
||||
case 0:
|
||||
|
@ -384,7 +382,6 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
|
|||
goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue