[NET]: cleanup extra semicolons
[powerpc.git] / net / ipv4 / xfrm4_policy.c
index 699f27c..4ff8ed3 100644 (file)
@@ -1,11 +1,11 @@
-/* 
+/*
  * xfrm4_policy.c
  *
  * Changes:
  *     Kazunori MIYAZAWA @USAGI
  *     YOSHIFUJI Hideaki @USAGI
  *             Split up af-specific portion
- *     
+ *
  */
 
 #include <linux/compiler.h>
@@ -50,8 +50,8 @@ __xfrm4_find_bundle(struct flowi *fl, struct xfrm_policy *policy)
                struct xfrm_dst *xdst = (struct xfrm_dst*)dst;
                if (xdst->u.rt.fl.oif == fl->oif &&     /*XXX*/
                    xdst->u.rt.fl.fl4_dst == fl->fl4_dst &&
-                   xdst->u.rt.fl.fl4_src == fl->fl4_src &&
-                   xdst->u.rt.fl.fl4_tos == fl->fl4_tos &&
+                   xdst->u.rt.fl.fl4_src == fl->fl4_src &&
+                   xdst->u.rt.fl.fl4_tos == fl->fl4_tos &&
                    xfrm_bundle_ok(policy, xdst, fl, AF_INET, 0)) {
                        dst_clone(dst);
                        break;
@@ -119,7 +119,7 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
 
                if (xfrm[i]->props.mode == XFRM_MODE_TUNNEL) {
                        unsigned short encap_family = xfrm[i]->props.family;
-                       switch(encap_family) {
+                       switch (encap_family) {
                        case AF_INET:
                                fl_tunnel.fl4_dst = xfrm[i]->id.daddr.a4;
                                fl_tunnel.fl4_src = xfrm[i]->props.saddr.a4;
@@ -209,8 +209,8 @@ error:
 static void
 _decode_session4(struct sk_buff *skb, struct flowi *fl)
 {
-       struct iphdr *iph = skb->nh.iph;
-       u8 *xprth = skb->nh.raw + iph->ihl*4;
+       struct iphdr *iph = ip_hdr(skb);
+       u8 *xprth = skb_network_header(skb) + iph->ihl * 4;
 
        memset(fl, 0, sizeof(struct flowi));
        if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) {
@@ -263,7 +263,7 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl)
                default:
                        fl->fl_ipsec_spi = 0;
                        break;
-               };
+               }
        }
        fl->proto = iph->protocol;
        fl->fl4_dst = iph->daddr;
@@ -291,7 +291,7 @@ static void xfrm4_dst_destroy(struct dst_entry *dst)
 
        if (likely(xdst->u.rt.idev))
                in_dev_put(xdst->u.rt.idev);
-       if (dst->xfrm->props.family == AF_INET && likely(xdst->u.rt.peer))
+       if (dst->xfrm && dst->xfrm->props.family == AF_INET && likely(xdst->u.rt.peer))
                inet_putpeer(xdst->u.rt.peer);
        xfrm_dst_destroy(xdst);
 }