sctp: remove unnecessary asoc in sctp_has_association
After Commit dae399d7fd
("sctp: hold transport instead of assoc
when lookup assoc in rx path"), it put transport instead of asoc
in sctp_has_association. Variable 'asoc' is not used any more.
So this patch is to remove it, while at it, it also changes the
return type of sctp_has_association to bool, and does the same
for it's caller sctp_endpoint_is_peeled_off.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
13d5a30a1e
commit
5306653850
@@ -1010,19 +1010,18 @@ struct sctp_association *sctp_lookup_association(struct net *net,
|
||||
}
|
||||
|
||||
/* Is there an association matching the given local and peer addresses? */
|
||||
int sctp_has_association(struct net *net,
|
||||
const union sctp_addr *laddr,
|
||||
const union sctp_addr *paddr)
|
||||
bool sctp_has_association(struct net *net,
|
||||
const union sctp_addr *laddr,
|
||||
const union sctp_addr *paddr)
|
||||
{
|
||||
struct sctp_association *asoc;
|
||||
struct sctp_transport *transport;
|
||||
|
||||
if ((asoc = sctp_lookup_association(net, laddr, paddr, &transport))) {
|
||||
if (sctp_lookup_association(net, laddr, paddr, &transport)) {
|
||||
sctp_transport_put(transport);
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user