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

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
...@@ -386,11 +386,9 @@ static inline struct list_head *sctp_list_dequeue(struct list_head *list) ...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment