aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/sctp.h')
-rw-r--r--include/net/sctp/sctp.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 2cb3980b1616..505845ddb0be 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -405,7 +405,7 @@ static inline void sctp_v6_del_protocol(void) { return; }
405/* Map an association to an assoc_id. */ 405/* Map an association to an assoc_id. */
406static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc) 406static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc)
407{ 407{
408 return (asoc?asoc->assoc_id:0); 408 return asoc ? asoc->assoc_id : 0;
409} 409}
410 410
411/* Look up the association by its id. */ 411/* Look up the association by its id. */
@@ -473,7 +473,7 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
473/* Tests if the list has one and only one entry. */ 473/* Tests if the list has one and only one entry. */
474static inline int sctp_list_single_entry(struct list_head *head) 474static inline int sctp_list_single_entry(struct list_head *head)
475{ 475{
476 return ((head->next != head) && (head->next == head->prev)); 476 return (head->next != head) && (head->next == head->prev);
477} 477}
478 478
479/* Generate a random jitter in the range of -50% ~ +50% of input RTO. */ 479/* Generate a random jitter in the range of -50% ~ +50% of input RTO. */
@@ -631,13 +631,13 @@ static inline int sctp_sanity_check(void)
631/* This is the hash function for the SCTP port hash table. */ 631/* This is the hash function for the SCTP port hash table. */
632static inline int sctp_phashfn(__u16 lport) 632static inline int sctp_phashfn(__u16 lport)
633{ 633{
634 return (lport & (sctp_port_hashsize - 1)); 634 return lport & (sctp_port_hashsize - 1);
635} 635}
636 636
637/* This is the hash function for the endpoint hash table. */ 637/* This is the hash function for the endpoint hash table. */
638static inline int sctp_ep_hashfn(__u16 lport) 638static inline int sctp_ep_hashfn(__u16 lport)
639{ 639{
640 return (lport & (sctp_ep_hashsize - 1)); 640 return lport & (sctp_ep_hashsize - 1);
641} 641}
642 642
643/* This is the hash function for the association hash table. */ 643/* This is the hash function for the association hash table. */
@@ -645,7 +645,7 @@ static inline int sctp_assoc_hashfn(__u16 lport, __u16 rport)
645{ 645{
646 int h = (lport << 16) + rport; 646 int h = (lport << 16) + rport;
647 h ^= h>>8; 647 h ^= h>>8;
648 return (h & (sctp_assoc_hashsize - 1)); 648 return h & (sctp_assoc_hashsize - 1);
649} 649}
650 650
651/* This is the hash function for the association hash table. This is 651/* This is the hash function for the association hash table. This is
@@ -656,7 +656,7 @@ static inline int sctp_vtag_hashfn(__u16 lport, __u16 rport, __u32 vtag)
656{ 656{
657 int h = (lport << 16) + rport; 657 int h = (lport << 16) + rport;
658 h ^= vtag; 658 h ^= vtag;
659 return (h & (sctp_assoc_hashsize-1)); 659 return h & (sctp_assoc_hashsize - 1);
660} 660}
661 661
662#define sctp_for_each_hentry(epb, node, head) \ 662#define sctp_for_each_hentry(epb, node, head) \