[PATCH] ppp_async.c: use time_after_eq() macro 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-10-01 02:49:22.000000000 +0400 +++ linux-kj/drivers/net/ppp_async.c 2005-10-01 02:59:47.000000000 +0400 @@ -30,6 +30,7 @@ #include #include #include +#include #include #define PPP_VERSION "2.4.2" @@ -576,7 +577,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;