From f6510ec83bd596d76370faeb612a04a85609dfcb Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 28 Jul 2016 23:40:57 +0100 Subject: [PATCH] ITS#8460 fix slap_op_time broken in 2d5996ac603391ddbd618425f88eb13e5e0e2cc0 Was allowing tv_usec to exceed 999999 --- servers/slapd/operation.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/operation.c b/servers/slapd/operation.c index d9a3f30f3f..f68a6255ae 100644 --- a/servers/slapd/operation.c +++ b/servers/slapd/operation.c @@ -173,11 +173,11 @@ slap_op_time(time_t *t, int *nop) tv.tv_usec <= last_time.tv_usec ) { tv.tv_sec = last_time.tv_sec; tv.tv_usec = last_time.tv_usec + 1; - if (tv.tv_usec >= 1000000) { - tv.tv_usec -= 1000000; - tv.tv_sec++; - last_time.tv_sec = tv.tv_sec; - } + } + if (tv.tv_usec >= 1000000) { + tv.tv_usec -= 1000000; + tv.tv_sec++; + last_time.tv_sec = tv.tv_sec; } last_time.tv_usec = tv.tv_usec; ldap_pvt_thread_mutex_unlock( &slap_op_mutex ); -- 2.39.5