diff options
author | bcook <> | 2014-11-26 05:41:44 +0000 |
---|---|---|
committer | bcook <> | 2014-11-26 05:41:44 +0000 |
commit | 9aa9a99c8a572d5c1ba4b5ed7d67015b22834d7b (patch) | |
tree | e24000bb02af11c522d3e72613f9a110722f2415 /src/lib | |
parent | 03d95c2cd2c8c51b99d99abdf835cf31e4812725 (diff) | |
download | openbsd-9aa9a99c8a572d5c1ba4b5ed7d67015b22834d7b.tar.gz openbsd-9aa9a99c8a572d5c1ba4b5ed7d67015b22834d7b.tar.bz2 openbsd-9aa9a99c8a572d5c1ba4b5ed7d67015b22834d7b.zip |
remove superflous gettimeofday wrapper.
ok beck@ tedu@ miod@ guenther@ doug@ deraadt@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bio/bss_dgram.c | 11 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/bio/bss_dgram.c | 11 |
2 files changed, 4 insertions, 18 deletions
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 @@ | |||
1 | /* $OpenBSD: bss_dgram.c,v 1.36 2014/11/26 05:39:06 bcook Exp $ */ | 1 | /* $OpenBSD: bss_dgram.c,v 1.37 2014/11/26 05:41:44 bcook Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -104,8 +104,6 @@ static void dgram_sctp_handle_auth_free_key_event(BIO *b, | |||
104 | 104 | ||
105 | static int BIO_dgram_should_retry(int s); | 105 | static int BIO_dgram_should_retry(int s); |
106 | 106 | ||
107 | static void get_current_time(struct timeval *t); | ||
108 | |||
109 | static BIO_METHOD methods_dgramp = { | 107 | static BIO_METHOD methods_dgramp = { |
110 | .type = BIO_TYPE_DGRAM, | 108 | .type = BIO_TYPE_DGRAM, |
111 | .name = "datagram socket", | 109 | .name = "datagram socket", |
@@ -257,7 +255,7 @@ dgram_adjust_rcv_timeout(BIO *b) | |||
257 | } | 255 | } |
258 | 256 | ||
259 | /* Get current time */ | 257 | /* Get current time */ |
260 | get_current_time(&timenow); | 258 | gettimeofday(&timenow, NULL); |
261 | 259 | ||
262 | /* Calculate time left until timer expires */ | 260 | /* Calculate time left until timer expires */ |
263 | memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval)); | 261 | memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval)); |
@@ -1611,9 +1609,4 @@ BIO_dgram_non_fatal_error(int err) | |||
1611 | return (0); | 1609 | return (0); |
1612 | } | 1610 | } |
1613 | 1611 | ||
1614 | static void | ||
1615 | get_current_time(struct timeval *t) { | ||
1616 | gettimeofday(t, NULL); | ||
1617 | } | ||
1618 | |||
1619 | #endif | 1612 | #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 @@ | |||
1 | /* $OpenBSD: bss_dgram.c,v 1.36 2014/11/26 05:39:06 bcook Exp $ */ | 1 | /* $OpenBSD: bss_dgram.c,v 1.37 2014/11/26 05:41:44 bcook Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -104,8 +104,6 @@ static void dgram_sctp_handle_auth_free_key_event(BIO *b, | |||
104 | 104 | ||
105 | static int BIO_dgram_should_retry(int s); | 105 | static int BIO_dgram_should_retry(int s); |
106 | 106 | ||
107 | static void get_current_time(struct timeval *t); | ||
108 | |||
109 | static BIO_METHOD methods_dgramp = { | 107 | static BIO_METHOD methods_dgramp = { |
110 | .type = BIO_TYPE_DGRAM, | 108 | .type = BIO_TYPE_DGRAM, |
111 | .name = "datagram socket", | 109 | .name = "datagram socket", |
@@ -257,7 +255,7 @@ dgram_adjust_rcv_timeout(BIO *b) | |||
257 | } | 255 | } |
258 | 256 | ||
259 | /* Get current time */ | 257 | /* Get current time */ |
260 | get_current_time(&timenow); | 258 | gettimeofday(&timenow, NULL); |
261 | 259 | ||
262 | /* Calculate time left until timer expires */ | 260 | /* Calculate time left until timer expires */ |
263 | memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval)); | 261 | memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval)); |
@@ -1611,9 +1609,4 @@ BIO_dgram_non_fatal_error(int err) | |||
1611 | return (0); | 1609 | return (0); |
1612 | } | 1610 | } |
1613 | 1611 | ||
1614 | static void | ||
1615 | get_current_time(struct timeval *t) { | ||
1616 | gettimeofday(t, NULL); | ||
1617 | } | ||
1618 | |||
1619 | #endif | 1612 | #endif |