diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2017-09-21 23:47:09 +0300 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2017-09-25 08:14:06 +0300 |
commit | 1bd963a72e859d194d87a5a2a8839efee7e23102 (patch) | |
tree | ee5b1c33339db67950d7f8bcf34d0ae466aa02e2 /include/net/xfrm.h | |
parent | 06cd22f830f28023b82455c82c7db65fc6cf9c16 (diff) | |
download | linux-1bd963a72e859d194d87a5a2a8839efee7e23102.tar.xz |
xfrm: make xfrm_alg_auth_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 2abc0e117f11..5d5e11b653eb 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1774,7 +1774,7 @@ static inline unsigned int xfrm_alg_len(const struct xfrm_algo *alg) return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); } -static inline int xfrm_alg_auth_len(const struct xfrm_algo_auth *alg) +static inline unsigned int xfrm_alg_auth_len(const struct xfrm_algo_auth *alg) { return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); } |