diff options
author | Florian Westphal <fw@strlen.de> | 2018-12-18 19:15:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-19 22:21:37 +0300 |
commit | 0ca64da128b816b2826e9b469f47239c47f1df31 (patch) | |
tree | 1772b09b0ce8f686851f3a854777e2b2001ea1f1 /include/net/xfrm.h | |
parent | de8bda1d22d38b7d5cd08b33f86efd94d4c86630 (diff) | |
download | linux-0ca64da128b816b2826e9b469f47239c47f1df31.tar.xz |
xfrm: change secpath_set to return secpath struct, not error value
It can only return 0 (success) or -ENOMEM.
Change return value to a pointer to secpath struct.
This avoids direct access to skb->sp:
err = secpath_set(skb);
if (!err) ..
skb->sp-> ...
Becomes:
sp = secpath_set(skb)
if (!sp) ..
sp-> ..
This reduces noise in followup patch which is going to remove skb->sp.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 0a8d70d16918..62ca62177bc6 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1131,7 +1131,7 @@ secpath_put(struct sec_path *sp) } struct sec_path *secpath_dup(struct sec_path *src); -int secpath_set(struct sk_buff *skb); +struct sec_path *secpath_set(struct sk_buff *skb); static inline void secpath_reset(struct sk_buff *skb) |