Merge in SNORT/snort3 from ~BMORRIS2/snort3:cppcheck_operator to master
Squashed commit of the following:
commit
255884ac3dd41076a21b901a286fc1de9437abbd
Author: Brian Morris <bmorris2@cisco.com>
Date: Fri Apr 14 14:52:20 2023 +0000
src: fix broken unit test/tweak define related to previous operator bool fixes
uint64_t latency_suspends = 0;
bool is_active() const
- { return elapsed > 0_ticks || checks > 0; }
+ { return elapsed > CLOCK_ZERO || checks > 0; }
};
/* function pointer list for rule head nodes */
CHECK( true == state_a.is_active() );
OtnState state_c = OtnState();
- CHECK( true == state_c.is_active() );
+ CHECK( false == state_c.is_active() );
state_c.elapsed = 1_ticks;
CHECK( true == state_c.is_active() );
{ elapsed = 0_ticks; checks = 0; }
bool is_active() const
- { return ( elapsed > 0_ticks ) || checks; }
+ { return ( elapsed > CLOCK_ZERO ) || checks; }
// reentrancy control
bool enter() const { return ref_count++ == 0; }