Commit f347c4fa authored by Herbert Xu's avatar Herbert Xu

[CRYPTO] authenc: Move initialisations up to shut up gcc

It seems that newer versions of gcc have regressed in their abilities to
analyse initialisations.  This patch moves the initialisations up to avoid
the warnings.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 2ffbb837
...@@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req) ...@@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req)
.tfm = auth, .tfm = auth,
}; };
u8 *hash = aead_request_ctx(req); u8 *hash = aead_request_ctx(req);
struct scatterlist *dst; struct scatterlist *dst = req->dst;
unsigned int cryptlen; unsigned int cryptlen = req->cryptlen;
int err; int err;
hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth),
...@@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req) ...@@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req)
if (err) if (err)
goto auth_unlock; goto auth_unlock;
cryptlen = req->cryptlen;
dst = req->dst;
err = crypto_hash_update(&desc, dst, cryptlen); err = crypto_hash_update(&desc, dst, cryptlen);
if (err) if (err)
goto auth_unlock; goto auth_unlock;
...@@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req) ...@@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req)
}; };
u8 *ohash = aead_request_ctx(req); u8 *ohash = aead_request_ctx(req);
u8 *ihash; u8 *ihash;
struct scatterlist *src; struct scatterlist *src = req->src;
unsigned int cryptlen; unsigned int cryptlen = req->cryptlen;
unsigned int authsize; unsigned int authsize;
int err; int err;
...@@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req) ...@@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req)
if (err) if (err)
goto auth_unlock; goto auth_unlock;
cryptlen = req->cryptlen;
src = req->src;
err = crypto_hash_update(&desc, src, cryptlen); err = crypto_hash_update(&desc, src, cryptlen);
if (err) if (err)
goto auth_unlock; goto auth_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment