]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
eCryptfs: remove unnecessary variable initializations
authorMichael Halcrow <mhalcrow@us.ibm.com>
Tue, 16 Oct 2007 08:28:03 +0000 (01:28 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:11 +0000 (09:43 -0700)
Andrew Morton wrote:
> >       struct mutex *tfm_mutex = NULL;
>
> This initialisation looks like it's here to kill bogus gcc warning
> (if it is, it should have been commented).  Please investigate
> uninitialized_var() and __maybe_unused sometime.

Remove some unnecessary variable initializations. There may be a few
more such intializations remaining in the code base; a future patch
will take care of those.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/keystore.c

index e9cda7afe6be9498078bcb2c7630a01ec15bebb6..a6cbfc16d8a43522314872a87b14c283bf4cc036 100644 (file)
@@ -1009,7 +1009,7 @@ decrypt_passphrase_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
 {
        struct scatterlist dst_sg;
        struct scatterlist src_sg;
-       struct mutex *tfm_mutex = NULL;
+       struct mutex *tfm_mutex;
        struct blkcipher_desc desc = {
                .flags = CRYPTO_TFM_REQ_MAY_SLEEP
        };
@@ -1123,8 +1123,8 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
        size_t found_auth_tok;
        size_t next_packet_is_auth_tok_packet;
        struct list_head auth_tok_list;
-       struct ecryptfs_auth_tok *matching_auth_tok = NULL;
-       struct ecryptfs_auth_tok *candidate_auth_tok = NULL;
+       struct ecryptfs_auth_tok *matching_auth_tok;
+       struct ecryptfs_auth_tok *candidate_auth_tok;
        char *candidate_auth_tok_sig;
        size_t packet_size;
        struct ecryptfs_auth_tok *new_auth_tok;