Skip to content

Commit

Permalink
[NET]: Fix warnings after LSM-IPSEC changes.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Jun 18, 2006
1 parent 9dadaa1 commit 6f68dc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/linux/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6f68dc3

Please sign in to comment.