Re: [INET] Avoid an integer divide in rt_garbage_collect()

2007-12-21 Thread David Miller
From: Eric Dumazet <[EMAIL PROTECTED]> Date: Fri, 21 Dec 2007 09:20:50 +0100 > Since 'goal' is a signed int, compiler may emit an integer divide > to compute goal/2. > > Using a right shift is OK here and less expensive. > > Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]> Applied, thanks. -- To

[INET] Avoid an integer divide in rt_garbage_collect()

2007-12-21 Thread Eric Dumazet
Since 'goal' is a signed int, compiler may emit an integer divide to compute goal/2. Using a right shift is OK here and less expensive. Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]> diff --git a/net/ipv4/route.c b/net/ipv4/route.c index e35076e..10915bb 100644 --- a/net/ipv4/route.c +++ b/net