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

Commit eb8e9771 authored by Marcelo Ricardo Leitner's avatar Marcelo Ricardo Leitner Committed by David S. Miller
Browse files

sctp: use list_* in sctp_list_dequeue



Use list_* helpers in sctp_list_dequeue, more readable.

Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e43569e6
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -386,11 +386,9 @@ static inline struct list_head *sctp_list_dequeue(struct list_head *list)
{
{
	struct list_head *result = NULL;
	struct list_head *result = NULL;


	if (list->next != list) {
	if (!list_empty(list)) {
		result = list->next;
		result = list->next;
		list->next = result->next;
		list_del_init(result);
		list->next->prev = list;
		INIT_LIST_HEAD(result);
	}
	}
	return result;
	return result;
}
}