From 18d706ca25cba6b3d1c2a2c97562c40a1745b72d Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 12 Aug 2023 18:30:44 +0200 Subject: lib: Fix signed/unsigned mismatches on raspbian Compilation on raspberry pi revealed some previously undetected signed/unsigned comparisons in the library. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/dev.c | 2 +- src/lib/frct.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/dev.c b/src/lib/dev.c index 293d055e..69843c58 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -299,7 +299,7 @@ static void _flow_keepalive(struct flow * flow) struct timespec s_act; struct timespec r_act; int flow_id; - uint32_t timeo; + time_t timeo; uint32_t acl; s_act = flow->snd_act; diff --git a/src/lib/frct.c b/src/lib/frct.c index 3b1cd6c7..7451e9e9 100644 --- a/src/lib/frct.c +++ b/src/lib/frct.c @@ -789,8 +789,8 @@ static void rtt_estimator(struct frcti * frcti, #ifdef PROC_FLOW_STATS frcti->n_rtt++; #endif - frcti->srtt = MAX(1000U, srtt); - frcti->mdev = MAX(100U, rttvar); + frcti->srtt = MAX(1000L, srtt); + frcti->mdev = MAX(100L, rttvar); frcti->rto = MAX(RTO_MIN, frcti->srtt + (frcti->mdev << MDEV_MUL)); } -- cgit v1.2.3