]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
code cleanup - remove SigMatchGetLastPattern
authorAnoop Saldanha <poonaatsoc@gmail.com>
Sat, 18 Feb 2012 06:39:05 +0000 (12:09 +0530)
committerVictor Julien <victor@inliniac.net>
Sat, 18 Feb 2012 16:57:05 +0000 (17:57 +0100)
src/detect-content.c
src/detect-content.h

index c9e0ede963b8a20feafbe9aa980c11a3570b6b00..56ed6ec1bc9d7ab0bf1ba0612deb93e13bb57e47 100644 (file)
@@ -420,36 +420,6 @@ SigMatch *DetectContentGetLastPattern(SigMatch *sm)
     return sm;
 }
 
-/** \brief get the last pattern sigmatch, content or uricontent
- *
- *  \param s signature
- *
- *  \retval sm sigmatch of either content or uricontent that is the last
- *             or NULL if none was found
- */
-SigMatch *SigMatchGetLastPattern(Signature *s) {
-    SCEnter();
-
-    BUG_ON(s == NULL);
-
-    SigMatch *co_sm = DetectContentGetLastPattern(s->sm_lists_tail[DETECT_SM_LIST_PMATCH]);
-    SigMatch *ur_sm = SigMatchGetLastSM(s->sm_lists_tail[DETECT_SM_LIST_UMATCH], DETECT_URICONTENT);
-    SigMatch *sm = NULL;
-
-    if (co_sm != NULL && ur_sm != NULL) {
-        if (co_sm->idx > ur_sm->idx)
-            sm = co_sm;
-        else
-            sm = ur_sm;
-    } else if (co_sm != NULL) {
-        sm = co_sm;
-    } else if (ur_sm != NULL) {
-        sm = ur_sm;
-    }
-
-    SCReturnPtr(sm, "SigMatch");
-}
-
 /**
  * \brief Print list of DETECT_CONTENT SigMatch's allocated in a
  * SigMatch list, from the current sm to the end
index cfeef4b308706f18b83c4be771e2aa5a763cb6f6..e94a4c7e5d813012acaebc020f082ecf42ccd9f1 100644 (file)
@@ -117,8 +117,6 @@ SigMatch *DetectContentFindNextApplicableSM(SigMatch *);
  * a Pattern before the SigMatch passed as argument */
 SigMatch *DetectContentHasPrevSMPattern(SigMatch *);
 
-SigMatch *SigMatchGetLastPattern(Signature *s);
-
 void DetectContentFree(void *);
 
 #endif /* __DETECT_CONTENT_H__ */