From 802350f65aa6aaa019483948300318390dc5c92f Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Sat, 18 Feb 2012 12:10:42 +0530 Subject: [PATCH] code cleanup - remove DetectContentHasPrevSMPattern --- src/detect-content.c | 25 ------------------------- src/detect-content.h | 4 ---- 2 files changed, 29 deletions(-) diff --git a/src/detect-content.c b/src/detect-content.c index 56ed6ec1bc..687879e543 100644 --- a/src/detect-content.c +++ b/src/detect-content.c @@ -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 diff --git a/src/detect-content.h b/src/detect-content.h index e94a4c7e5d..a6f7dd313a 100644 --- a/src/detect-content.h +++ b/src/detect-content.h @@ -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__ */