From ffbbf1a1ba5c66ebfe3fd67d17dc177d3d89b6a0 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 16 Feb 2020 21:08:59 +0000 Subject: unravel isc_time_add and isc_time_subtract OK millert --- usr.bin/dig/lib/isc/log.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'usr.bin/dig/lib/isc/log.c') diff --git a/usr.bin/dig/lib/isc/log.c b/usr.bin/dig/lib/isc/log.c index afdc560064e..00762a6d894 100644 --- a/usr.bin/dig/lib/isc/log.c +++ b/usr.bin/dig/lib/isc/log.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: log.c,v 1.10 2020/02/16 21:08:15 florian Exp $ */ +/* $Id: log.c,v 1.11 2020/02/16 21:08:59 florian Exp $ */ /*! \file * \author Principal Authors: DCL */ @@ -988,16 +988,8 @@ isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category, * range. */ TIME_NOW(&oldest); - if (isc_time_subtract(&oldest, &interval, - &oldest) - != ISC_R_SUCCESS) - /* - * Can't effectively do the checking - * without having a valid time. - */ - message = NULL; - else - message = ISC_LIST_HEAD(lctx->messages); + timespecsub(&oldest, &interval, &oldest); + message = ISC_LIST_HEAD(lctx->messages); while (message != NULL) { if (timespeccmp(&message->time, -- cgit v1.2.3-59-g8ed1b