Skip to content

Commit

Permalink
flow: fix -Wshorten-64-to-32 warnings
Browse files Browse the repository at this point in the history
Ticket: OISF#6186
  • Loading branch information
catenacyber committed Jul 4, 2024
1 parent 1997f86 commit 9394726
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/flow-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9394726

Please sign in to comment.