mirror of https://github.com/OISF/suricata
detect/content-inspect: code cleanup
Rearrange code slightly to make it more clear that `found` cannot be NULL further down the loop. cppcheck: src/detect-engine-content-inspection.c:316:50: warning: Either the condition 'found!=NULL' is redundant or there is overflow in pointer subtraction. [nullPointerArithmeticRedundantCheck] match_offset = (uint32_t)((found - buffer) + cd->content_len); ^ src/detect-engine-content-inspection.c:308:30: note: Assuming that condition 'found!=NULL' is not redundant } else if (found != NULL && (cd->flags & DETECT_CONTENT_NEGATED)) { ^ src/detect-engine-content-inspection.c:316:50: note: Null pointer subtraction match_offset = (uint32_t)((found - buffer) + cd->content_len); ^ Bug: #5291.pull/7321/head
parent
a0847e6c69
commit
27e9a871d0
Loading…
Reference in New Issue