Skip to content

Commit

Permalink
[CRYPTO] authenc: Move initialisations up to shut up gcc
Browse files Browse the repository at this point in the history
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: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Herbert Xu committed Nov 23, 2007
1 parent 2ffbb83 commit f347c4f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions crypto/authenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req)
.tfm = auth,
};
u8 *hash = aead_request_ctx(req);
struct scatterlist *dst;
unsigned int cryptlen;
struct scatterlist *dst = req->dst;
unsigned int cryptlen = req->cryptlen;
int err;

hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth),
Expand All @@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req)
if (err)
goto auth_unlock;

cryptlen = req->cryptlen;
dst = req->dst;
err = crypto_hash_update(&desc, dst, cryptlen);
if (err)
goto auth_unlock;
Expand Down Expand Up @@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req)
};
u8 *ohash = aead_request_ctx(req);
u8 *ihash;
struct scatterlist *src;
unsigned int cryptlen;
struct scatterlist *src = req->src;
unsigned int cryptlen = req->cryptlen;
unsigned int authsize;
int err;

Expand All @@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req)
if (err)
goto auth_unlock;

cryptlen = req->cryptlen;
src = req->src;
err = crypto_hash_update(&desc, src, cryptlen);
if (err)
goto auth_unlock;
Expand Down

0 comments on commit f347c4f

Please sign in to comment.