Minor code cleanup
This commit is contained in:
+10
-9
@@ -875,19 +875,20 @@ static AC_NODE_t *node_findbs_next_ac (AC_NODE_t * thiz, uint8_t alpha,int icase
|
|||||||
static int node_has_matchstr (AC_NODE_t * thiz, AC_PATTERN_t * newstr)
|
static int node_has_matchstr (AC_NODE_t * thiz, AC_PATTERN_t * newstr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
AC_PATTERN_t * str;
|
|
||||||
if(!thiz->matched_patterns) return 0;
|
if(!thiz->matched_patterns) return 0;
|
||||||
str = thiz->matched_patterns->patterns;
|
|
||||||
|
|
||||||
for (i=0; i < thiz->matched_patterns->num; str++,i++)
|
for (i=0; i < thiz->matched_patterns->num; i++)
|
||||||
{
|
{
|
||||||
if (str->length != newstr->length)
|
AC_PATTERN_t *str = &(thiz->matched_patterns->patterns[i]);
|
||||||
continue;
|
|
||||||
|
|
||||||
if(!memcmp(str->astring,newstr->astring,str->length))
|
if (str->length != newstr->length)
|
||||||
return 1;
|
continue;
|
||||||
|
|
||||||
|
if(!memcmp(str->astring,newstr->astring,str->length))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user