From 92c769f206d407024cec677b838e67e64769249e Mon Sep 17 00:00:00 2001 From: Stuart Reilly Date: Fri, 12 Jul 2019 16:41:39 +0100 Subject: Solve remaining warnings --- src/lib/ndpi_main.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 325123476..b679fe283 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -5861,7 +5861,6 @@ int ndpi_match_string_subprotocol(struct ndpi_detection_module_struct *ndpi_stru AC_TEXT_t ac_input_text; ndpi_automa *automa = is_host_match ? &ndpi_struct->host_automa : &ndpi_struct->content_automa; AC_REP_t match = { NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NDPI_PROTOCOL_UNRATED }; - int rc; if((automa->ac_automa == NULL) || (string_to_match_len == 0)) return(NDPI_PROTOCOL_UNKNOWN); @@ -5872,22 +5871,15 @@ int ndpi_match_string_subprotocol(struct ndpi_detection_module_struct *ndpi_stru } ac_input_text.astring = string_to_match, ac_input_text.length = string_to_match_len; - rc = ac_automata_search(((AC_AUTOMATA_t*)automa->ac_automa), &ac_input_text, &match); + ac_automata_search(((AC_AUTOMATA_t*)automa->ac_automa), &ac_input_text, &match); ac_automata_reset(((AC_AUTOMATA_t*)automa->ac_automa)); /* We need to take into account also rc==0 that is used for partial matches */ -#if 0 - if(rc) { -#endif ret_match->protocol_id = match.number, ret_match->protocol_category = match.category, ret_match->protocol_breed = match.breed; return(match.number); -#if 0 - } else - return(NDPI_PROTOCOL_UNKNOWN); -#endif } #ifdef HAVE_HYPERSCAN -- cgit v1.2.3