flow: fix -Wshorten-64-to-32 warnings

Ticket: #6186
pull/11454/head
Philippe Antoine 2 years ago committed by Victor Julien
parent 9c0875b2a4
commit eeb290384a

@ -422,7 +422,7 @@ static uint32_t FlowTimeoutHash(FlowManagerTimeoutThread *td, SCTime_t ts, const
#define TYPE uint32_t
#endif
const uint32_t ts_secs = SCTIME_SECS(ts);
const uint32_t ts_secs = (uint32_t)SCTIME_SECS(ts);
for (uint32_t idx = hash_min; idx < hash_max; idx+=BITS) {
TYPE check_bits = 0;
const uint32_t check = MIN(BITS, (hash_max - idx));
@ -948,8 +948,8 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data)
struct timeval cond_tv;
gettimeofday(&cond_tv, NULL);
struct timeval add_tv;
add_tv.tv_sec = 0;
add_tv.tv_usec = (sleep_per_wu * 1000);
add_tv.tv_sec = sleep_per_wu / 1000;
add_tv.tv_usec = (sleep_per_wu % 1000) * 1000;
timeradd(&cond_tv, &add_tv, &cond_tv);
struct timespec cond_time = FROM_TIMEVAL(cond_tv);

Loading…
Cancel
Save