Skip to content

Commit 6fc3e68

Browse files
geliangtangdavem330
authored andcommitted
sctp: use list_is_singular in sctp_list_single_entry
Use list_is_singular() instead of open-coding. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ac6a86a commit 6fc3e68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/net/sctp/sctp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static inline void sctp_skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
412412
/* Tests if the list has one and only one entry. */
413413
static inline int sctp_list_single_entry(struct list_head *head)
414414
{
415-
return (head->next != head) && (head->next == head->prev);
415+
return list_is_singular(head);
416416
}
417417

418418
static inline bool sctp_chunk_pending(const struct sctp_chunk *chunk)

0 commit comments

Comments
 (0)