code cleanup - remove DetectContentHasPrevSMPattern

remotes/origin/master
Anoop Saldanha 14 years ago committed by Victor Julien
parent 9652c3672d
commit 802350f65a

@ -370,31 +370,6 @@ SigMatch *DetectContentFindNextApplicableSM(SigMatch *sm)
return sm;
}
/**
* \brief Helper function to determine if there are patterns before this one,
* this is used before installing a new within or distance modifier
* because if this return NULL, it will never match!
*
* \param sm pointer to the current SigMatch of a parsing process
*
* \retval null if no applicable SigMatch pattern was found
* \retval pointer to the SigMatch that has the previous SigMatch
* of type DetectContent
*
* \todo: should we add here DETECT_PCRE, DETECT_URI_CONTENT, etc?
*/
SigMatch *DetectContentHasPrevSMPattern(SigMatch *sm)
{
if (sm == NULL)
return NULL;
/* the current SM doesn't apply */
sm = sm->prev;
while (sm != NULL && sm->type != DETECT_CONTENT)
sm = sm->prev;
return sm;
}
/**
* \brief Search the first DETECT_CONTENT
* \retval pointer to the SigMatch holding the DetectContent

@ -113,10 +113,6 @@ SigMatch *DetectContentGetLastPattern(SigMatch *);
* a DETECT_CONTENT context. The Match process call this */
SigMatch *DetectContentFindNextApplicableSM(SigMatch *);
/** This function search backwards if we have a SigMatch holding
* a Pattern before the SigMatch passed as argument */
SigMatch *DetectContentHasPrevSMPattern(SigMatch *);
void DetectContentFree(void *);
#endif /* __DETECT_CONTENT_H__ */

Loading…
Cancel
Save