]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: fix bad BUG_ON pattern
authorVictor Julien <vjulien@oisf.net>
Tue, 26 Apr 2022 19:33:52 +0000 (21:33 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 3 May 2022 11:30:19 +0000 (13:30 +0200)
commita6335a76b487070fd63fadd45a23fed35d70f0c7
treef66076acea81062e73f812f92a30b9cc521e7c80
parent33a65050fb4bb6b54e74875ffc576e9c38feb9ad
detect: fix bad BUG_ON pattern

cppcheck:

src/detect-engine-uint.c:73:13: warning: Conversion of string literal "unknown mode" to bool always evaluates to true. [incorrectStringBooleanError]
            BUG_ON("unknown mode");
            ^
src/detect-engine-uint.c:328:13: warning: Conversion of string literal "unknown mode" to bool always evaluates to true. [incorrectStringBooleanError]
            BUG_ON("unknown mode");
            ^
src/detect-pcre.c:291:25: warning: Conversion of string literal "Impossible captype" to bool always evaluates to true. [incorrectStringBooleanError]
                        BUG_ON("Impossible captype");
                        ^

Bug: #5291.
(cherry picked from commit 7e2ed11a11cae89bc07e9a25425192581687993d)
src/detect-engine-uint.c