From 9aa9a99c8a572d5c1ba4b5ed7d67015b22834d7b Mon Sep 17 00:00:00 2001 From: bcook <> Date: Wed, 26 Nov 2014 05:41:44 +0000 Subject: remove superflous gettimeofday wrapper. ok beck@ tedu@ miod@ guenther@ doug@ deraadt@ --- src/lib/libcrypto/bio/bss_dgram.c | 11 ++--------- src/lib/libssl/src/crypto/bio/bss_dgram.c | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c index b71311be0c..2e17dc9e21 100644 --- a/src/lib/libcrypto/bio/bss_dgram.c +++ b/src/lib/libcrypto/bio/bss_dgram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_dgram.c,v 1.36 2014/11/26 05:39:06 bcook Exp $ */ +/* $OpenBSD: bss_dgram.c,v 1.37 2014/11/26 05:41:44 bcook Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -104,8 +104,6 @@ static void dgram_sctp_handle_auth_free_key_event(BIO *b, static int BIO_dgram_should_retry(int s); -static void get_current_time(struct timeval *t); - static BIO_METHOD methods_dgramp = { .type = BIO_TYPE_DGRAM, .name = "datagram socket", @@ -257,7 +255,7 @@ dgram_adjust_rcv_timeout(BIO *b) } /* Get current time */ - get_current_time(&timenow); + gettimeofday(&timenow, NULL); /* Calculate time left until timer expires */ memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval)); @@ -1611,9 +1609,4 @@ BIO_dgram_non_fatal_error(int err) return (0); } -static void -get_current_time(struct timeval *t) { - gettimeofday(t, NULL); -} - #endif diff --git a/src/lib/libssl/src/crypto/bio/bss_dgram.c b/src/lib/libssl/src/crypto/bio/bss_dgram.c index b71311be0c..2e17dc9e21 100644 --- a/src/lib/libssl/src/crypto/bio/bss_dgram.c +++ b/src/lib/libssl/src/crypto/bio/bss_dgram.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bss_dgram.c,v 1.36 2014/11/26 05:39:06 bcook Exp $ */ +/* $OpenBSD: bss_dgram.c,v 1.37 2014/11/26 05:41:44 bcook Exp $ */ /* * DTLS implementation written by Nagendra Modadugu * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. @@ -104,8 +104,6 @@ static void dgram_sctp_handle_auth_free_key_event(BIO *b, static int BIO_dgram_should_retry(int s); -static void get_current_time(struct timeval *t); - static BIO_METHOD methods_dgramp = { .type = BIO_TYPE_DGRAM, .name = "datagram socket", @@ -257,7 +255,7 @@ dgram_adjust_rcv_timeout(BIO *b) } /* Get current time */ - get_current_time(&timenow); + gettimeofday(&timenow, NULL); /* Calculate time left until timer expires */ memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval)); @@ -1611,9 +1609,4 @@ BIO_dgram_non_fatal_error(int err) return (0); } -static void -get_current_time(struct timeval *t) { - gettimeofday(t, NULL); -} - #endif -- cgit v1.2.3-55-g6feb