app-layer: cleanup inspect id getter

Since pstate can't be NULL, remove the conditional logic.
pull/15752/head
Victor Julien 2 months ago
parent 5a770adc27
commit f4f521272a

@ -743,12 +743,8 @@ void AppLayerParserSetTransactionLogId(AppLayerParserState *pstate, uint64_t tx_
uint64_t AppLayerParserGetTransactionInspectId(AppLayerParserState *pstate, uint8_t direction)
{
SCEnter();
if (pstate != NULL)
SCReturnCT(pstate->inspect_id[(direction & STREAM_TOSERVER) ? 0 : 1], "uint64_t");
DEBUG_VALIDATE_BUG_ON(1);
SCReturnCT(0ULL, "uint64_t");
DEBUG_VALIDATE_BUG_ON(pstate == NULL);
SCReturnCT(pstate->inspect_id[(direction & STREAM_TOSERVER) ? 0 : 1], "uint64_t");
}
inline uint8_t AppLayerParserGetTxDetectProgress(AppLayerTxData *txd, const uint8_t dir)

Loading…
Cancel
Save