summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2016-04-01 19:30:32 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-05 21:44:08 +0200
commiteb8e97715f29a1240cdf67b0df725be27433259f (patch)
tree90676102e20414b3a891961325d1f7110d729632 /include
parentsctp: flush if we can't fit another DATA chunk (diff)
downloadlinux-eb8e97715f29a1240cdf67b0df725be27433259f.tar.xz
linux-eb8e97715f29a1240cdf67b0df725be27433259f.zip
sctp: use list_* in sctp_list_dequeue
Use list_* helpers in sctp_list_dequeue, more readable. Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sctp/sctp.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 65521cfdcade..03fb33efcae2 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -386,11 +386,9 @@ static inline struct list_head *sctp_list_dequeue(struct list_head *list)
{
struct list_head *result = NULL;
- if (list->next != list) {
+ if (!list_empty(list)) {
result = list->next;
- list->next = result->next;
- list->next->prev = list;
- INIT_LIST_HEAD(result);
+ list_del_init(result);
}
return result;
}