diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2017-09-21 22:46:30 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2017-09-25 07:14:06 +0200 |
commit | 06cd22f830f28023b82455c82c7db65fc6cf9c16 (patch) | |
tree | 3274d9055df20b977126ebf9db2fd69e0f17b402 /include/net/xfrm.h | |
parent | xfrm: make aead_len() return unsigned int (diff) | |
download | linux-06cd22f830f28023b82455c82c7db65fc6cf9c16.tar.xz linux-06cd22f830f28023b82455c82c7db65fc6cf9c16.zip |
xfrm: make xfrm_alg_len() return unsigned int
Key lengths can't be negative.
Comparison with nla_len() is left signed just in case negative value
can sneak in there.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 0be4c547e383..2abc0e117f11 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1769,7 +1769,7 @@ static inline unsigned int aead_len(struct xfrm_algo_aead *alg) return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); } -static inline int xfrm_alg_len(const struct xfrm_algo *alg) +static inline unsigned int xfrm_alg_len(const struct xfrm_algo *alg) { return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); } |