From e851804c92daa94d9db88b17a1030e982b5bfd18 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Sat, 18 Feb 2012 11:43:05 +0530 Subject: [PATCH] code cleanup - remove DetectUricontentGetLastPattern --- src/detect-uricontent.c | 26 -------------------------- src/detect-uricontent.h | 1 - 2 files changed, 27 deletions(-) diff --git a/src/detect-uricontent.c b/src/detect-uricontent.c index 53f7e6c1c2..f8f6cdb297 100644 --- a/src/detect-uricontent.c +++ b/src/detect-uricontent.c @@ -154,32 +154,6 @@ void DetectUricontentPrint(DetectContentData *cd) SCLogDebug("-----------"); } - -/** - * \brief Search the first DETECT_URICONTENT - * \retval pointer to the SigMatch holding the DetectUricontent - * \param sm pointer to the current SigMatch of a parsing process - * \retval null if no applicable DetectUricontent was found - * \retval pointer to the SigMatch that has the previous SigMatch - * of type DetectUricontent - */ -SigMatch *DetectUricontentGetLastPattern(SigMatch *sm) -{ - if (sm == NULL) - return NULL; - while (sm != NULL && sm->type != DETECT_URICONTENT) - sm = sm->prev; - - if (sm == NULL) - return NULL; - - DetectContentData *cd = (DetectContentData*) sm->ctx; - if (cd == NULL) - return NULL; - - return sm; -} - /** * \brief Setup the detecturicontent keyword data from the string defined in * the rule set. diff --git a/src/detect-uricontent.h b/src/detect-uricontent.h index 659de5c89c..7514cd1f1e 100644 --- a/src/detect-uricontent.h +++ b/src/detect-uricontent.h @@ -34,7 +34,6 @@ void DetectUricontentRegister (void); uint32_t DetectUricontentMaxId(DetectEngineCtx *); //uint32_t DetectUricontentInspectMpm(DetectEngineThreadCtx *det_ctx, void *alstate); -SigMatch *DetectUricontentGetLastPattern(SigMatch *); void DetectUricontentPrint(DetectContentData *); uint32_t DetectUricontentInspectMpm(DetectEngineThreadCtx *, Flow *, HtpState *, uint8_t);