aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-06-09 02:58:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-18 00:29:49 -0400
commit6f68dc37759b1d6ff3b4d4a9d097605a09f8f043 (patch)
tree7d0be960b8c0ec5b947637a0650f1c639002103a
parent9dadaa19cb11a8db38072a92a3f95deab7a797fb (diff)
[NET]: Fix warnings after LSM-IPSEC changes.
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>
-rw-r--r--include/linux/security.h2
-rw-r--r--net/xfrm/xfrm_user.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 14c9bd050607..4dfb1b84a9b3 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -2995,7 +2995,7 @@ static inline void security_xfrm_state_free(struct xfrm_state *x)
2995{ 2995{
2996} 2996}
2997 2997
2998static inline int security_xfrm_state_delete(struct xfrm_policy *xp) 2998static inline int security_xfrm_state_delete(struct xfrm_state *x)
2999{ 2999{
3000 return 0; 3000 return 0;
3001} 3001}
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index a3733d2db3ba..c21dc26141ea 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -427,7 +427,7 @@ static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfrma)
427 if (x == NULL) 427 if (x == NULL)
428 return -ESRCH; 428 return -ESRCH;
429 429
430 if (err = security_xfrm_state_delete(x)) 430 if ((err = security_xfrm_state_delete(x)) != 0)
431 goto out; 431 goto out;
432 432
433 if (xfrm_state_kern(x)) { 433 if (xfrm_state_kern(x)) {
@@ -1057,7 +1057,7 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, void **xfr
1057 MSG_DONTWAIT); 1057 MSG_DONTWAIT);
1058 } 1058 }
1059 } else { 1059 } else {
1060 if (err = security_xfrm_policy_delete(xp)) 1060 if ((err = security_xfrm_policy_delete(xp)) != 0)
1061 goto out; 1061 goto out;
1062 c.data.byid = p->index; 1062 c.data.byid = p->index;
1063 c.event = nlh->nlmsg_type; 1063 c.event = nlh->nlmsg_type;