[NET]: Fix warnings after LSM-IPSEC changes.
authorDavid S. Miller <davem@sunset.davemloft.net>
Fri, 9 Jun 2006 06:58:52 +0000 (23:58 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 18 Jun 2006 04:29:49 +0000 (21:29 -0700)
Assignment used as truth value in xfrm_del_sa()
and xfrm_get_policy().

Wrong argument type declared for security_xfrm_state_delete()
when SELINUX is disabled.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/security.h
net/xfrm/xfrm_user.c

index 14c9bd0506077e853063c7288d6d571295daee8b..4dfb1b84a9b3bef236ef041b3005692462d7b51b 100644 (file)
@@ -2995,7 +2995,7 @@ static inline void security_xfrm_state_free(struct xfrm_state *x)
 {
 }
 
-static inline int security_xfrm_state_delete(struct xfrm_policy *xp)
+static inline int security_xfrm_state_delete(struct xfrm_state *x)
 {
        return 0;
 }
index a3733d2db3ba675d138fe653ef9e957063f35a30..c21dc26141eae947f921e881016cbd64da735c64 100644 (file)
@@ -427,7 +427,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
        if (x == NULL)
                return -ESRCH;
 
-       if (err = security_xfrm_state_delete(x))
+       if ((err = security_xfrm_state_delete(x)) != 0)
                goto out;
 
        if (xfrm_state_kern(x)) {
@@ -1057,7 +1057,7 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr
                                              MSG_DONTWAIT);
                }
        } else {
-               if (err = security_xfrm_policy_delete(xp))
+               if ((err = security_xfrm_policy_delete(xp)) != 0)
                        goto out;
                c.data.byid = p->index;
                c.event = nlh->nlmsg_type;