Skip to content

Commit 5c31c9b

Browse files
murphy12138tyhicks
authored andcommitted
ecryptfs: simplify list initialization in ecryptfs_parse_packet_set()
In ecryptfs_parse_packet_set(),use LIST_HEAD() to declare and initialize the 'auth_tok_list' list in one step instead of using INIT_LIST_HEAD() separately. No functional change. Signed-off-by: Baolin Liu <liubaolin@kylinos.cn> Signed-off-by: Tyler Hicks <code@tyhicks.com>
1 parent 111625b commit 5c31c9b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/ecryptfs/keystore.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
17161716
size_t i = 0;
17171717
size_t found_auth_tok;
17181718
size_t next_packet_is_auth_tok_packet;
1719-
struct list_head auth_tok_list;
1719+
LIST_HEAD(auth_tok_list);
17201720
struct ecryptfs_auth_tok *matching_auth_tok;
17211721
struct ecryptfs_auth_tok *candidate_auth_tok;
17221722
char *candidate_auth_tok_sig;
@@ -1729,7 +1729,6 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat,
17291729
struct key *auth_tok_key = NULL;
17301730
int rc = 0;
17311731

1732-
INIT_LIST_HEAD(&auth_tok_list);
17331732
/* Parse the header to find as many packets as we can; these will be
17341733
* added the our &auth_tok_list */
17351734
next_packet_is_auth_tok_packet = 1;

0 commit comments

Comments
 (0)