]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
proto detect - fix coverity CID 1204325 2489/head
authorJason Ish <ish@unx.ca>
Mon, 16 Jan 2017 16:44:19 +0000 (10:44 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 17 Jan 2017 09:39:24 +0000 (10:39 +0100)
CID 1204325 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: mask = 0U;.
433        mask = 0;

additionally, mask is initialized to 0

src/app-layer-detect-proto.c

index f861349045dddd2289c8aeb7dfeae989ed7af780..c82cc8d0d978fb6e826b21ebd5b666cfec015509 100644 (file)
@@ -437,8 +437,6 @@ static AppProto AppLayerProtoDetectPPGetProto(Flow *f,
         mask = pp_port_dp->alproto_mask;
     else if (pp_port_sp)
         mask = pp_port_sp->alproto_mask;
-    else
-        mask = 0;
 
     if (alproto_masks[0] == mask) {
         FLOW_SET_PP_DONE(f, direction);