summaryrefslogtreecommitdiff
path: root/include/net/sctp/sctp.h
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2016-04-01 20:30:32 +0300
committerDavid S. Miller <davem@davemloft.net>2016-04-05 22:44:08 +0300
commiteb8e97715f29a1240cdf67b0df725be27433259f (patch)
tree90676102e20414b3a891961325d1f7110d729632 /include/net/sctp/sctp.h
parente43569e6d3c71eb266641c6297ea54f7ac66954f (diff)
downloadlinux-eb8e97715f29a1240cdf67b0df725be27433259f.tar.xz
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/net/sctp/sctp.h')
-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;
}