summaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2020-06-28 17:32:25 +0800
committerDavid S. Miller <davem@davemloft.net>2020-06-28 21:45:58 -0700
commit6fc3e68f5b35c4861b28733fa32f636db7188746 (patch)
tree19e74dc9ac656a4c49d11df68f2135127d86ac21 /include/net/sctp
parentac6a86a5392f123671e309697ec7b8f0c6f01c62 (diff)
downloadlinux-6fc3e68f5b35c4861b28733fa32f636db7188746.tar.bz2
sctp: use list_is_singular in sctp_list_single_entry
Use list_is_singular() instead of open-coding. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/sctp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index f8bcb75bb044..e3bd198b00ae 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -412,7 +412,7 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
/* Tests if the list has one and only one entry. */
static inline int sctp_list_single_entry(struct list_head *head)
{
- return (head->next != head) && (head->next == head->prev);
+ return list_is_singular(head);
}
static inline bool sctp_chunk_pending(const struct sctp_chunk *chunk)