]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
xbits: fix coverity warnings
authorVictor Julien <victor@inliniac.net>
Wed, 29 Apr 2015 13:51:19 +0000 (15:51 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 30 Apr 2015 12:46:27 +0000 (14:46 +0200)
Switch statement would contain NOALERT even though this was
unreachable.

src/detect-flowbits.c
src/detect-hostbits.c
src/detect-xbits.c

index 315cb8cfc9c3d52adad76e73b87efdf790116615..bb95c95cd659d1c895776278ed84e8716d25f673 100644 (file)
@@ -260,9 +260,7 @@ int DetectFlowbitSetup (DetectEngineCtx *de_ctx, Signature *s, char *rawstr)
     sm->ctx = (SigMatchCtx *)cd;
 
     switch (fb_cmd) {
-        case DETECT_FLOWBITS_CMD_NOALERT:
-            /* nothing to do */
-            break;
+        /* case DETECT_FLOWBITS_CMD_NOALERT can't happen here */
 
         case DETECT_FLOWBITS_CMD_ISNOTSET:
         case DETECT_FLOWBITS_CMD_ISSET:
index a940897b9afa03b6a2717ce3e33660f32185d771..a69c292f1260731763363a361f4abb0b728e0d59 100644 (file)
@@ -403,9 +403,7 @@ int DetectHostbitSetup (DetectEngineCtx *de_ctx, Signature *s, char *rawstr)
     sm->ctx = (void *)cd;
 
     switch (fb_cmd) {
-        case DETECT_XBITS_CMD_NOALERT:
-            /* nothing to do */
-            break;
+        /* case DETECT_XBITS_CMD_NOALERT can't happen here */
 
         case DETECT_XBITS_CMD_ISNOTSET:
         case DETECT_XBITS_CMD_ISSET:
index 09a85a5c73a5f9612b957de2335add7c95b30f9a..876ddc36dfdc8189b7211405679c57fc135b9094 100644 (file)
@@ -327,9 +327,7 @@ int DetectXbitSetup (DetectEngineCtx *de_ctx, Signature *s, char *rawstr)
     sm->ctx = (void *)cd;
 
     switch (fb_cmd) {
-        case DETECT_XBITS_CMD_NOALERT:
-            /* nothing to do */
-            break;
+        /* case DETECT_XBITS_CMD_NOALERT can't happen here */
 
         case DETECT_XBITS_CMD_ISNOTSET:
         case DETECT_XBITS_CMD_ISSET: