[PATCH] drivers/net/ppp_async.c: use time_after_eq() From: Marcelo Feitoza Parisi It deals with wrapping correctly and is nicer to read. Signed-off-by: Marcelo Feitoza Parisi Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/net/ppp_async.c =================================================================== --- linux-kj.orig/drivers/net/ppp_async.c 2005-12-05 13:17:53.000000000 +0300 +++ linux-kj/drivers/net/ppp_async.c 2005-12-05 13:19:14.000000000 +0300 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -577,7 +578,7 @@ ppp_async_encode(struct asyncppp *ap) * character if necessary. */ if (islcp || flag_time == 0 - || jiffies - ap->last_xmit >= flag_time) + || time_after_eq(jiffies, ap->last_xmit + flag_time)) *buf++ = PPP_FLAG; ap->last_xmit = jiffies; fcs = PPP_INITFCS;