summaryrefslogtreecommitdiff
path: root/src/libstddjb/leapsecs_sub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/leapsecs_sub.c')
-rw-r--r--src/libstddjb/leapsecs_sub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/leapsecs_sub.c b/src/libstddjb/leapsecs_sub.c
index f5c1c9b..c9fd66c 100644
--- a/src/libstddjb/leapsecs_sub.c
+++ b/src/libstddjb/leapsecs_sub.c
@@ -12,8 +12,8 @@ int leapsecs_sub (uint64_t *t)
for (; i < leapsecs_table_len ; i++)
{
if (u < leapsecs_table[i]) break ;
- ++d ;
if (u == leapsecs_table[i]) hit = 1 ;
+ else d++ ;
}
*t = u - d ;
return hit ;