Skip to content

Commit

Permalink
[PKT_SCHED] sch_htb: use rb_first() cleanup
Browse files Browse the repository at this point in the history
Use rb_first() to get first entry in rb tree.

Signed-off-by: Akinbou Mita <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
mita authored and davem330 committed Oct 12, 2006
1 parent b974179 commit 30bdbe3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/sched/sch_htb.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,11 +786,10 @@ static long htb_do_events(struct htb_sched *q, int level)
for (i = 0; i < 500; i++) {
struct htb_class *cl;
long diff;
struct rb_node *p = q->wait_pq[level].rb_node;
struct rb_node *p = rb_first(&q->wait_pq[level]);

if (!p)
return 0;
while (p->rb_left)
p = p->rb_left;

cl = rb_entry(p, struct htb_class, pq_node);
if (time_after(cl->pq_key, q->jiffies)) {
Expand Down

0 comments on commit 30bdbe3

Please sign in to comment.