aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-11 04:45:17 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2007-11-23 06:32:09 -0500
commitf347c4facfee3d11eb9cd1c070ab471a8fb7401e (patch)
treec2df0e75fe45a0c4d31a30d7eb5c20cf363cab0e
parent2ffbb8377c7a0713baf6644e285adc27a5654582 (diff)
[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: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/authenc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c
index 0b29a6ae673d..126a529b496d 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req)
84 .tfm = auth, 84 .tfm = auth,
85 }; 85 };
86 u8 *hash = aead_request_ctx(req); 86 u8 *hash = aead_request_ctx(req);
87 struct scatterlist *dst; 87 struct scatterlist *dst = req->dst;
88 unsigned int cryptlen; 88 unsigned int cryptlen = req->cryptlen;
89 int err; 89 int err;
90 90
91 hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), 91 hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth),
@@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req)
100 if (err) 100 if (err)
101 goto auth_unlock; 101 goto auth_unlock;
102 102
103 cryptlen = req->cryptlen;
104 dst = req->dst;
105 err = crypto_hash_update(&desc, dst, cryptlen); 103 err = crypto_hash_update(&desc, dst, cryptlen);
106 if (err) 104 if (err)
107 goto auth_unlock; 105 goto auth_unlock;
@@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req)
159 }; 157 };
160 u8 *ohash = aead_request_ctx(req); 158 u8 *ohash = aead_request_ctx(req);
161 u8 *ihash; 159 u8 *ihash;
162 struct scatterlist *src; 160 struct scatterlist *src = req->src;
163 unsigned int cryptlen; 161 unsigned int cryptlen = req->cryptlen;
164 unsigned int authsize; 162 unsigned int authsize;
165 int err; 163 int err;
166 164
@@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req)
177 if (err) 175 if (err)
178 goto auth_unlock; 176 goto auth_unlock;
179 177
180 cryptlen = req->cryptlen;
181 src = req->src;
182 err = crypto_hash_update(&desc, src, cryptlen); 178 err = crypto_hash_update(&desc, src, cryptlen);
183 if (err) 179 if (err)
184 goto auth_unlock; 180 goto auth_unlock;