From 1a83fee5f561d0f32f00e3bf59da2f655b96b526 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 29 Apr 2015 15:51:19 +0200 Subject: [PATCH] xbits: fix coverity warnings Switch statement would contain NOALERT even though this was unreachable. --- src/detect-flowbits.c | 4 +--- src/detect-hostbits.c | 4 +--- src/detect-xbits.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/detect-flowbits.c b/src/detect-flowbits.c index 315cb8cfc9..bb95c95cd6 100644 --- a/src/detect-flowbits.c +++ b/src/detect-flowbits.c @@ -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: diff --git a/src/detect-hostbits.c b/src/detect-hostbits.c index a940897b9a..a69c292f12 100644 --- a/src/detect-hostbits.c +++ b/src/detect-hostbits.c @@ -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: diff --git a/src/detect-xbits.c b/src/detect-xbits.c index 09a85a5c73..876ddc36df 100644 --- a/src/detect-xbits.c +++ b/src/detect-xbits.c @@ -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: