From: Victor Julien Date: Wed, 29 Apr 2015 13:51:19 +0000 (+0200) Subject: xbits: fix coverity warnings X-Git-Tag: suricata-2.1beta4~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a83fee5f561d0f32f00e3bf59da2f655b96b526;p=thirdparty%2Fsuricata.git xbits: fix coverity warnings Switch statement would contain NOALERT even though this was unreachable. --- 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: