Use of the time_before() and time_after() macros, defined at linux/jiffies.h, which deal with wrapping correctly and are nicer to read. Signed-off-by: Marcelo Feitoza Parisi --- linux/drivers/net/shaper.c 2005-07-13 17:52:19.000000000 -0300 +++ linux-kj/drivers/net/shaper.c 2005-07-16 01:46:18.835005176 -0300 @@ -161,7 +161,8 @@ while(ptr && ptr!=(struct sk_buff *)&shaper->sendq) { if(ptr->pripri - && jiffies - SHAPERCB(ptr)->shapeclock < SHAPER_MAXSLIP) + && time_before(jiffies, SHAPERCB(ptr)->shapeclock + + SHAPER_MAXSLIP)) { struct sk_buff *tmp=ptr->prev; @@ -214,7 +215,8 @@ /* * Queue over time. Spill packet. */ - if(SHAPERCB(skb)->shapeclock-jiffies > SHAPER_LATENCY) { + if(time_after(SHAPERCB(skb)->shapeclock, jiffies + + SHAPER_LATENCY)) { dev_kfree_skb(skb); shaper->stats.tx_dropped++; } else