diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-26 02:06:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:37 -0400 |
commit | dc5fc579b90ed0a9a4e55b0218cdbaf0a8cf2e67 (patch) | |
tree | 673dbb425c2b09b4256ef71f89dfc5cc01944386 /net/xfrm | |
parent | a36ca733375860b389c15ffdf6a5f92df64a33b6 (diff) |
[NETLINK]: Use nlmsg_trim() where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_user.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 814bb3125ada..6b7f6dc144c7 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -628,7 +628,7 @@ out: | |||
628 | 628 | ||
629 | nlmsg_failure: | 629 | nlmsg_failure: |
630 | rtattr_failure: | 630 | rtattr_failure: |
631 | skb_trim(skb, b - skb->data); | 631 | nlmsg_trim(skb, b); |
632 | return -1; | 632 | return -1; |
633 | } | 633 | } |
634 | 634 | ||
@@ -1182,7 +1182,7 @@ out: | |||
1182 | return 0; | 1182 | return 0; |
1183 | 1183 | ||
1184 | nlmsg_failure: | 1184 | nlmsg_failure: |
1185 | skb_trim(skb, b - skb->data); | 1185 | nlmsg_trim(skb, b); |
1186 | return -1; | 1186 | return -1; |
1187 | } | 1187 | } |
1188 | 1188 | ||
@@ -1367,7 +1367,7 @@ static int build_aevent(struct sk_buff *skb, struct xfrm_state *x, struct km_eve | |||
1367 | 1367 | ||
1368 | rtattr_failure: | 1368 | rtattr_failure: |
1369 | nlmsg_failure: | 1369 | nlmsg_failure: |
1370 | skb_trim(skb, b - skb->data); | 1370 | nlmsg_trim(skb, b); |
1371 | return -1; | 1371 | return -1; |
1372 | } | 1372 | } |
1373 | 1373 | ||
@@ -1767,7 +1767,7 @@ static int build_migrate(struct sk_buff *skb, struct xfrm_migrate *m, | |||
1767 | nlh->nlmsg_len = skb_tail_pointer(skb) - b; | 1767 | nlh->nlmsg_len = skb_tail_pointer(skb) - b; |
1768 | return skb->len; | 1768 | return skb->len; |
1769 | nlmsg_failure: | 1769 | nlmsg_failure: |
1770 | skb_trim(skb, b - skb->data); | 1770 | nlmsg_trim(skb, b); |
1771 | return -1; | 1771 | return -1; |
1772 | } | 1772 | } |
1773 | 1773 | ||
@@ -1956,7 +1956,7 @@ static int build_expire(struct sk_buff *skb, struct xfrm_state *x, struct km_eve | |||
1956 | return skb->len; | 1956 | return skb->len; |
1957 | 1957 | ||
1958 | nlmsg_failure: | 1958 | nlmsg_failure: |
1959 | skb_trim(skb, b - skb->data); | 1959 | nlmsg_trim(skb, b); |
1960 | return -1; | 1960 | return -1; |
1961 | } | 1961 | } |
1962 | 1962 | ||
@@ -2157,7 +2157,7 @@ static int build_acquire(struct sk_buff *skb, struct xfrm_state *x, | |||
2157 | return skb->len; | 2157 | return skb->len; |
2158 | 2158 | ||
2159 | nlmsg_failure: | 2159 | nlmsg_failure: |
2160 | skb_trim(skb, b - skb->data); | 2160 | nlmsg_trim(skb, b); |
2161 | return -1; | 2161 | return -1; |
2162 | } | 2162 | } |
2163 | 2163 | ||
@@ -2268,7 +2268,7 @@ static int build_polexpire(struct sk_buff *skb, struct xfrm_policy *xp, | |||
2268 | return skb->len; | 2268 | return skb->len; |
2269 | 2269 | ||
2270 | nlmsg_failure: | 2270 | nlmsg_failure: |
2271 | skb_trim(skb, b - skb->data); | 2271 | nlmsg_trim(skb, b); |
2272 | return -1; | 2272 | return -1; |
2273 | } | 2273 | } |
2274 | 2274 | ||
@@ -2427,7 +2427,7 @@ static int build_report(struct sk_buff *skb, u8 proto, | |||
2427 | 2427 | ||
2428 | nlmsg_failure: | 2428 | nlmsg_failure: |
2429 | rtattr_failure: | 2429 | rtattr_failure: |
2430 | skb_trim(skb, b - skb->data); | 2430 | nlmsg_trim(skb, b); |
2431 | return -1; | 2431 | return -1; |
2432 | } | 2432 | } |
2433 | 2433 | ||