Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c59ebd3 authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller
Browse files

sock: use hlist_entry_safe



Use hlist_entry_safe() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c10aa71b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -544,8 +544,7 @@ static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head)

static inline struct sock *sk_next(const struct sock *sk)
{
	return sk->sk_node.next ?
		hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL;
	return hlist_entry_safe(sk->sk_node.next, struct sock, sk_node);
}

static inline struct sock *sk_nulls_next(const struct sock *sk)