eCryptfs: Fix payload_len unitialized variable warning
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Fri, 5 Aug 2011 09:15:19 +0000 (04:15 -0500)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Tue, 9 Aug 2011 18:42:46 +0000 (13:42 -0500)
fs/ecryptfs/keystore.c: In function ‘ecryptfs_generate_key_packet_set’:
fs/ecryptfs/keystore.c:1991:28: warning: ‘payload_len’ may be used uninitialized in this function [-Wuninitialized]
fs/ecryptfs/keystore.c:1976:9: note: ‘payload_len’ was declared here

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/keystore.c

index 08a2b52bf565c2aab2eab60546f961b76ca699c4..ac1ad48c2376df4b3061e55a973b27b42388f510 100644 (file)
@@ -1973,7 +1973,7 @@ pki_encrypt_session_key(struct key *auth_tok_key,
 {
        struct ecryptfs_msg_ctx *msg_ctx = NULL;
        char *payload = NULL;
-       size_t payload_len;
+       size_t payload_len = 0;
        struct ecryptfs_message *msg;
        int rc;