Solve remaining warnings
This commit is contained in:
+1
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user