[Openvpn-devel,v1] otime: Remove openvpn_time()
Commit Message
From: Frank Lichtenheld <frank@lichtenheld.com>
Using this function seems to be more complicated
than just using now directly.
Suggested by Arne in review of cppcheck fixes.
Change-Id: I2bd5259de702fce5d4ef6926c1dee7c6e6e597d7
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1841
---
This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1841
This mail reflects revision 1 of this Change.
Acked-by according to Gerrit (reflected above):
Arne Schwabe <arne-openvpn@rfc2549.org>
@@ -93,17 +93,6 @@
#endif
}
-static inline time_t
-openvpn_time(time_t *t)
-{
- update_time();
- if (t)
- {
- *t = now;
- }
- return now;
-}
-
static inline void
tv_clear(struct timeval *tv)
{
@@ -42,7 +42,8 @@
static time_t
__mytime(void)
{
- return openvpn_time(NULL);
+ update_time();
+ return now;
}
#if !defined(_WIN32)
@@ -999,9 +999,7 @@
else if (tls_authentication_status(c->c2.tls_multi) == TLS_AUTHENTICATION_SUCCEEDED
&& c->c2.tls_multi->multi_state >= CAS_CONNECT_DONE)
{
- time_t now;
-
- openvpn_time(&now);
+ update_time();
if (c->c2.sent_push_reply_expiry > now)
{
ret = PUSH_MSG_ALREADY_REPLIED;