*/
static int DetectMarkSetup (DetectEngineCtx *de_ctx, Signature *s, const char *rawstr)
{
-#ifdef NFQ
- DetectMarkData *data = NULL;
- SigMatch *sm = NULL;
-
- data = DetectMarkParse(rawstr);
-
+#ifndef NFQ
+ return 0;
+#else
+ DetectMarkData *data = DetectMarkParse(rawstr);
if (data == NULL) {
return -1;
- } else {
- sm = SigMatchAlloc();
- if (sm == NULL) {
- DetectMarkDataFree(data);
- return -1;
- }
+ }
+ SigMatch *sm = SigMatchAlloc();
+ if (sm == NULL) {
+ DetectMarkDataFree(data);
+ return -1;
+ }
- sm->type = DETECT_MARK;
- sm->ctx = (SigMatchCtx *)data;
+ sm->type = DETECT_MARK;
+ sm->ctx = (SigMatchCtx *)data;
- /* Append it to the list of tags */
- SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_TMATCH);
- return 0;
- }
-#else
+ /* Append it to the list of tags */
+ SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_TMATCH);
return 0;
#endif
}