summaryrefslogtreecommitdiffstats
path: root/ssl/event_queue.c
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-07-27 11:52:17 +1000
committerMatt Caswell <matt@openssl.org>2022-08-12 15:44:01 +0100
commitd13c8b7725437490be8c1a2b438936af10f808d0 (patch)
tree9b81352bc87cdf6b4908b8c1eb935b555a5430be /ssl/event_queue.c
parent2d46a44ff24173d2cf5ea2196360cb79470d49c7 (diff)
Make OSSL_TIME a structure
This prevents misuses creeping in. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18882)
Diffstat (limited to 'ssl/event_queue.c')
-rw-r--r--ssl/event_queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/event_queue.c b/ssl/event_queue.c
index f828d5280f..ed3c790904 100644
--- a/ssl/event_queue.c
+++ b/ssl/event_queue.c
@@ -145,16 +145,16 @@ int ossl_event_queue_remove(OSSL_EVENT_QUEUE *queue, OSSL_EVENT *event)
OSSL_TIME ossl_event_time_until(const OSSL_EVENT *event)
{
if (event == NULL)
- return OSSL_TIME_INFINITY;
+ return ossl_time_infinite();
return ossl_time_subtract(event->when, ossl_time_now());
}
OSSL_TIME ossl_event_queue_time_until_next(const OSSL_EVENT_QUEUE *queue)
{
if (queue == NULL)
- return OSSL_TIME_INFINITY;
+ return ossl_time_infinite();
if (ossl_pqueue_OSSL_EVENT_num(queue->now_events) > 0)
- return OSSL_TIME_IMMEDIATE;
+ return ossl_time_zero();
return ossl_event_time_until(ossl_pqueue_OSSL_EVENT_peek(queue->timed_events));
}