From a1660c9422c8fef9e7c74d1dedd249106d4be18b Mon Sep 17 00:00:00 2001 From: Hugo Landau Date: Wed, 30 Nov 2022 08:02:50 +0000 Subject: [PATCH] QUIC Front End I/O API: Remove unnecessary code from SSL_get_tick_timeout Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/19703) --- ssl/quic/quic_impl.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c index 9dab1a92748..682ca6484f8 100644 --- a/ssl/quic/quic_impl.c +++ b/ssl/quic/quic_impl.c @@ -411,7 +411,7 @@ int ossl_quic_tick(QUIC_CONNECTION *qc) */ int ossl_quic_get_tick_timeout(QUIC_CONNECTION *qc, struct timeval *tv) { - OSSL_TIME now, deadline = ossl_time_infinite(); + OSSL_TIME deadline = ossl_time_infinite(); if (qc->ch != NULL) deadline @@ -423,14 +423,7 @@ int ossl_quic_get_tick_timeout(QUIC_CONNECTION *qc, struct timeval *tv) return 1; } - now = ossl_time_now(); - if (ossl_time_compare(now, deadline) >= 0) { - tv->tv_sec = 0; - tv->tv_usec = 0; - return 1; - } - - *tv = ossl_time_to_timeval(ossl_time_subtract(deadline, now)); + *tv = ossl_time_to_timeval(ossl_time_subtract(deadline, ossl_time_now())); return 1; } -- 2.47.2