Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f347c4facfee3d11eb9cd1c070ab471a8fb7401e
Commit:     f347c4facfee3d11eb9cd1c070ab471a8fb7401e
Parent:     2ffbb8377c7a0713baf6644e285adc27a5654582
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 11 16:45:17 2007 +0800
Committer:  Herbert Xu <[EMAIL PROTECTED]>
CommitDate: Fri Nov 23 19:32:09 2007 +0800

    [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 <[EMAIL PROTECTED]>
---
 crypto/authenc.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/crypto/authenc.c b/crypto/authenc.c
index 0b29a6a..126a529 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -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), 
@@ -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;
@@ -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;
 
@@ -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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to