* [patch 1/1] drivers/net/ppp_async.c : Use of the time_after_eq() macro
@ 2005-07-31 11:11 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-07-31 11:11 UTC (permalink / raw)
To: linux-ppp
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Use of the time_after_eq() macro, defined at linux/jiffies.h, which deal
with wrapping correctly and are nicer to read.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
ppp_async.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: quilt/drivers/net/ppp_async.c
=================================--- quilt.orig/drivers/net/ppp_async.c
+++ quilt/drivers/net/ppp_async.c
@@ -30,6 +30,7 @@
#include <linux/ppp_channel.h>
#include <linux/spinlock.h>
#include <linux/init.h>
+#include <linux/jiffies.h>
#include <asm/uaccess.h>
#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;
--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-31 11:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-31 11:11 [patch 1/1] drivers/net/ppp_async.c : Use of the time_after_eq() macro domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).