From b3810b664aa3422d0c69c8fcf713c24d7bf16c26 Mon Sep 17 00:00:00 2001
From: Dimitri Staessens <dimitri@ouroboros.rocks>
Date: Fri, 25 Feb 2022 00:15:30 +0100
Subject: lib: Remove dead code in timerwheel

The checked condition can't happen.

Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
---
 src/lib/timerwheel.c | 6 ------
 1 file changed, 6 deletions(-)

(limited to 'src/lib')

diff --git a/src/lib/timerwheel.c b/src/lib/timerwheel.c
index 487dcd0e..5c0fbfa0 100644
--- a/src/lib/timerwheel.c
+++ b/src/lib/timerwheel.c
@@ -395,12 +395,6 @@ static int timerwheel_ack(int            fd,
 
         clock_gettime(PTHREAD_COND_CLOCK, &now);
 
-        slot = DELT_ACK >> ACKQ_RES;
-        if (slot >= ACKQ_SLOTS) { /* Out of timerwheel range. */
-                free(a);
-                return -EPERM;
-        }
-
         slot = (((ts_to_ns(now) + DELT_ACK) >> ACKQ_RES) + 1)
                 & (ACKQ_SLOTS - 1);
 
-- 
cgit v1.2.3