]> git.ipfire.org Git - thirdparty/suricata.git/commit
app-layer: optimize pstate check
authorVictor Julien <vjulien@oisf.net>
Mon, 11 Sep 2023 07:22:16 +0000 (07:22 +0000)
committerVictor Julien <victor@inliniac.net>
Tue, 25 Feb 2025 14:49:32 +0000 (15:49 +0100)
commit1000b0cf33fab6a145f9af8941d162c91ba41992
tree72c16af3db261e11df2a2adcdae0149ebee7ac14
parent99eda1504ad6db49a4e83533e5878fd84b9be6b2
app-layer: optimize pstate check

To assist branch prediction, which showed a 100% miss rate, assume pstate
is non-NULL. Code review suggests all paths leading to the function actually
check pstate first, or alstate which can only be non-NULL if pstate was first
initialized. For now add a debug check.
src/app-layer-parser.c