detect/content-inspect: use of replace keyword is rare

Hint compiler about this.
pull/10134/head
Victor Julien 2 years ago committed by Victor Julien
parent bcb2b50cfc
commit e3f2b3418a

@ -337,7 +337,7 @@ static int DetectEngineContentInspectionInternal(DetectEngineThreadCtx *det_ctx,
if ((cd->flags & DETECT_CONTENT_ENDS_WITH) == 0 || match_offset == buffer_len) { if ((cd->flags & DETECT_CONTENT_ENDS_WITH) == 0 || match_offset == buffer_len) {
/* Match branch, add replace to the list if needed */ /* Match branch, add replace to the list if needed */
if (cd->flags & DETECT_CONTENT_REPLACE) { if (unlikely(cd->flags & DETECT_CONTENT_REPLACE)) {
if (inspection_mode == DETECT_ENGINE_CONTENT_INSPECTION_MODE_PAYLOAD) { if (inspection_mode == DETECT_ENGINE_CONTENT_INSPECTION_MODE_PAYLOAD) {
/* we will need to replace content if match is confirmed /* we will need to replace content if match is confirmed
* cast to non-const as replace writes to it. */ * cast to non-const as replace writes to it. */

Loading…
Cancel
Save