diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-16 09:48:46 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-16 09:48:46 +0000 |
commit | f88070517064b9d914ec86b5013a13d0669d668b (patch) | |
tree | bf28791ba22d54850344e3d978117789ae164eae | |
parent | 45747250cdcd2f5aa85b1002441d966b460957aa (diff) |
use timerclear macro. while here, fix spelling.
ok yasuoka@
-rw-r--r-- | usr.sbin/npppd/pppoe/pppoe_session.c | 7 | ||||
-rw-r--r-- | usr.sbin/npppd/pptp/pptp_ctrl.c | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/usr.sbin/npppd/pppoe/pppoe_session.c b/usr.sbin/npppd/pppoe/pppoe_session.c index 6207c7732d0..79212a24cf2 100644 --- a/usr.sbin/npppd/pppoe/pppoe_session.c +++ b/usr.sbin/npppd/pppoe/pppoe_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pppoe_session.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: pppoe_session.c,v 1.4 2011/03/16 09:48:45 okan Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -28,7 +28,7 @@ /**@file * Session management of PPPoE protocol - * $Id: pppoe_session.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ + * $Id: pppoe_session.c,v 1.4 2011/03/16 09:48:45 okan Exp $ */ #include <sys/types.h> @@ -114,8 +114,7 @@ pppoe_session_disconnect(pppoe_session *_this) pppoe_session_send_PADT(_this); /* free process should be par event */ - tv.tv_usec = 0; - tv.tv_sec = 0; + timerclear(&tv); evtimer_add(&_this->ev_disposing, &tv); _this->state = PPPOE_SESSION_STATE_DISPOSING; } diff --git a/usr.sbin/npppd/pptp/pptp_ctrl.c b/usr.sbin/npppd/pptp/pptp_ctrl.c index defa2afb325..fe82744d970 100644 --- a/usr.sbin/npppd/pptp/pptp_ctrl.c +++ b/usr.sbin/npppd/pptp/pptp_ctrl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pptp_ctrl.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $OpenBSD: pptp_ctrl.c,v 1.4 2011/03/16 09:48:45 okan Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -29,7 +29,7 @@ * PPTP(RFC 2637) control connection implementation. * currently it only support PAC part */ -/* $Id: pptp_ctrl.c,v 1.3 2010/07/02 21:20:57 yasuoka Exp $ */ +/* $Id: pptp_ctrl.c,v 1.4 2011/03/16 09:48:45 okan Exp $ */ #include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> @@ -274,8 +274,8 @@ pptp_ctrl_reset_timeout(pptp_ctrl *_this) switch (_this->state) { case PPTP_CTRL_STATE_DISPOSING: - tv.tv_sec = 0; /* call back immidiatly */ - tv.tv_usec = 0; + /* call back immediately */ + timerclear(&tv); break; default: tv.tv_sec = PPTP_CTRL_TIMEOUT_IVAL_SEC; |