diff options
| author | Baolin Liu <liubaolin@kylinos.cn> | 2025-11-11 15:13:25 +0300 |
|---|---|---|
| committer | Tyler Hicks <code@tyhicks.com> | 2025-12-24 00:23:23 +0300 |
| commit | 5c31c9bf9e2ff0d6c065ff7f2ccf8a1e95ddbb49 (patch) | |
| tree | f05ced0265b7e44e98ee160843ede039042e11b9 | |
| parent | 111625ba8ab818c68928c8cbfde8775dcd5d6690 (diff) | |
| download | linux-5c31c9bf9e2ff0d6c065ff7f2ccf8a1e95ddbb49.tar.xz | |
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>
| -rw-r--r-- | fs/ecryptfs/keystore.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 3a6283477d61..32e5e250c2dc 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c @@ -1716,7 +1716,7 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat, size_t i = 0; size_t found_auth_tok; size_t next_packet_is_auth_tok_packet; - struct list_head auth_tok_list; + LIST_HEAD(auth_tok_list); struct ecryptfs_auth_tok *matching_auth_tok; struct ecryptfs_auth_tok *candidate_auth_tok; char *candidate_auth_tok_sig; @@ -1729,7 +1729,6 @@ int ecryptfs_parse_packet_set(struct ecryptfs_crypt_stat *crypt_stat, struct key *auth_tok_key = NULL; int rc = 0; - INIT_LIST_HEAD(&auth_tok_list); /* Parse the header to find as many packets as we can; these will be * added the our &auth_tok_list */ next_packet_is_auth_tok_packet = 1; |
