Skip to content

Commit

Permalink
net_sched: sch_netem: use rb_entry()
Browse files Browse the repository at this point in the history
To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Geliang Tang authored and David S. Miller committed Dec 20, 2016
1 parent e124557 commit 7f7cd56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct netem_skb_cb {

static struct sk_buff *netem_rb_to_skb(struct rb_node *rb)
{
return container_of(rb, struct sk_buff, rbnode);
return rb_entry(rb, struct sk_buff, rbnode);
}

static inline struct netem_skb_cb *netem_skb_cb(struct sk_buff *skb)
Expand Down

0 comments on commit 7f7cd56

Please sign in to comment.