Skip to content

Commit

Permalink
sctp: Remove some redundant code
Browse files Browse the repository at this point in the history
In commit 311b217 ("sctp: simplify sk_receive_queue locking"), a call
to 'skb_queue_splice_tail_init()' has been made explicit. Previously it was
hidden in 'sctp_skb_list_tail()'

Now, the code around it looks redundant. The '_init()' part of
'skb_queue_splice_tail_init()' should already do the same.

Signed-off-by: Christophe JAILLET <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tititiou36 authored and davem330 committed Sep 19, 2016
1 parent 9535790 commit e8bc8f9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/sctp/ulpqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,8 @@ int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc)
* we can go ahead and clear out the lobby in one shot
*/
if (!skb_queue_empty(&sp->pd_lobby)) {
struct list_head *list;
skb_queue_splice_tail_init(&sp->pd_lobby,
&sk->sk_receive_queue);
list = (struct list_head *)&sctp_sk(sk)->pd_lobby;
INIT_LIST_HEAD(list);
return 1;
}
} else {
Expand Down

0 comments on commit e8bc8f9

Please sign in to comment.