flow: fix integer warnings

Ticket: 4516
pull/7242/head
Philippe Antoine 3 years ago committed by Victor Julien
parent 1cc9762b6a
commit 2a22b4ca1f

@ -300,8 +300,8 @@ int FlowForceReassemblyNeedReassembly(Flow *f)
}
TcpSession *ssn = (TcpSession *)f->protoctx;
int client = StreamNeedsReassembly(ssn, STREAM_TOSERVER);
int server = StreamNeedsReassembly(ssn, STREAM_TOCLIENT);
uint8_t client = StreamNeedsReassembly(ssn, STREAM_TOSERVER);
uint8_t server = StreamNeedsReassembly(ssn, STREAM_TOCLIENT);
/* if state is not fully closed we assume that we haven't fully
* inspected the app layer state yet */

@ -1159,7 +1159,8 @@ void FlowUpdateState(Flow *f, const enum FlowState s)
{
if (s != f->flow_state) {
/* set the state */
f->flow_state = s;
// Explicit cast from the enum type to the compact version
f->flow_state = (FlowStateType)s;
/* update timeout policy and value */
const uint32_t timeout_policy = FlowGetTimeoutPolicy(f);

@ -800,7 +800,7 @@ static int StreamTcpReassembleRawCheckLimit(const TcpSession *ssn,
/**
* \brief see what if any work the TCP session still needs
*/
int StreamNeedsReassembly(const TcpSession *ssn, uint8_t direction)
uint8_t StreamNeedsReassembly(const TcpSession *ssn, uint8_t direction)
{
const TcpStream *stream = NULL;
#ifdef DEBUG

@ -175,7 +175,7 @@ enum {
};
TmEcode StreamTcp (ThreadVars *, Packet *, void *, PacketQueueNoLock *);
int StreamNeedsReassembly(const TcpSession *ssn, uint8_t direction);
uint8_t StreamNeedsReassembly(const TcpSession *ssn, uint8_t direction);
TmEcode StreamTcpThreadInit(ThreadVars *, void *, void **);
TmEcode StreamTcpThreadDeinit(ThreadVars *tv, void *data);
void StreamTcpRegisterTests (void);

Loading…
Cancel
Save